Martin Kreuzer and Lorenzo Robbiano

Computational Commutative Algebra 1

July 3, 2000

Springer-Verlag

Berlin Heidelberg NewYork London Paris Tokyo Hong Kong Barcelona Budapest

Foreword

Hofstadter’s Law: It always takes longer than you think it will take,

even if you take into account Hofstadter’s Law. (Douglas R. Hofstadter)

Dear Reader,

what you are holding in your hands now is for you a book. But for us, for our families and friends, it has been known as the book over the last three years. Three years of intense work just to fill three centimeters of your bookshelf! This amounts to about one centimeter per year, or roughly two-fifths of an inch per year if you are non-metric. Clearly we had ample opportunity to experience the full force of Hofstadter’s Law.

Writing a book about Computational Commutative Algebra is not unlike computing a Gröbner basis: you need unshakeable faith to believe that the project will ever end; likewise, you must trust in the Noetherianity of polynomial rings to believe that Buchberger’s Algorithm will ever terminate. Naturally, we hope that the final result proves our efforts worthwhile. This is a book for learning, teaching, reading, and, most of all, enjoying the topic at hand.

Since neither of us is a native English speaker, the literary quality of this work is necessarily a little limited. Worries about our lack of linguistic sophistication grew considerably upon reading the following part of the introduction of “The Random House College Dictionary”

An educated speaker will transfer from informal haven’t to formal have not. The uneducated speaker who informally uses I seen or I done gone may adjust to the formal mode with I have saw and I have went.

Quite apart from being unable to distinguish between the informal and formal modes, we were frequently puzzled by such elementary questions as: is there another word for synonym? Luckily, we were able to extricate ourselves from the worst mires thanks to the generous aid of John Abbott and Tony Geramita. They provided us with much insight into British English and American English, respectively. However, notwithstanding their illuminating help, we were sometimes unable to discover the ultimate truth: should I be an ideal in a ring R or an ideal of a ring R? Finally, we decided to be non-partisan and use both.

Having revealed the names of two of our main aides, we now abandon all pretence and admit that the book is really a joint effort of many people. We especially thank Alessio Del Padrone who carefully checked every detail of the main text and test-solved all of the exercises. The tasks of proof-reading and checking tutorials were variously carried out by John Abbott, Anna Bigatti, Massimo Caboara, Robert Forkel, Tony Geramita, Bettina Kreuzer, and Marie Vitulli. Anna Bigatti wrote or improved many of the CoCoA programs we present, and also suggested the tutorials about Toric Ideals and Diophantine Systems and Integer Programming. The tutorial about Strange Polynomials comes from research by John Abbott. The tutorial about Elimination of Module Components comes from research in the doctoral thesis of Massimo Caboara. The tutorial about Splines was conceived by Jens Schmidbauer. Most tutorials were tested, and in many cases corrected, by the students who attended our lecture courses. Our colleagues Bruno Buchberger, Dave Perkinson, and Moss Sweedler helped us with material for jokes and quotes.

Moral help came from our families. Our wives Bettina and Gabriella, and our children Chiara, Francesco, Katharina, and Veronika patiently helped us to shoulder the problems and burdens which writing a book entails. And from the practical point of view, this project could never have come to a successful conclusion without the untiring support of Dr. Martin Peters, his assistant Ruth Allewelt, and the other members of the staff at Springer Verlag.

Finally, we would like to mention our favourite soccer teams, Bayern München and Juventus Turin, as well as the stock market mania of the late 1990s: they provided us with never-ending material for discussions when our work on the book became too overwhelming.

Martin Kreuzer and Lorenzo Robbiano, Regensburg and Genova, June 2000

Contents

Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0.1 What Is This Book About? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0.2 What Is a Gröbner Basis? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 0.3 Who Invented This Theory? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 0.4 Now, What Is This Book Really About? . . . . . . . . . . . . . . . . . . . 4 0.5 What Is This Book Not About? . . . . . . . . . . . . . . . . . . . . . . . . . . 7 0.6 Are There any Applications of This Theory? . . . . . . . . . . . . . . . 8 0.7 How Was This Book Written? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 0.8 What Is a Tutorial? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 0.9 What Is CoCoA? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 0.10 And What Is This Book Good for? . . . . . . . . . . . . . . . . . . . . . . . 12 0.11 Some Final Words of Wisdom . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1. Foundations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

1.1 Polynomial Rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Tutorial 1. Polynomial Representation I . . . . . . . . . . . . . . . . . . . . 24 Tutorial 2. The Extended Euclidean Algorithm . . . . . . . . . . . . . . 26 Tutorial 3. Finite Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

1.2 Unique Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Tutorial 4. Euclidean Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Tutorial 5. Squarefree Parts of Polynomials . . . . . . . . . . . . . . . . . 37 Tutorial 6. Berlekamp’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 38

1.3 Monomial Ideals and Monomial Modules . . . . . . . . . . . . . . . . . . 41

Tutorial 7. Cogenerators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Tutorial 8. Basic Operations with Monomial Ideals and Modules 48

1.4 Term Orderings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Tutorial 9. Monoid Orderings Represented by Matrices . . . . . . . . 57 Tutorial 10. Classification of Term Orderings . . . . . . . . . . . . . . . . 58

1.5 Leading Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Tutorial 11. Polynomial Representation II . . . . . . . . . . . . . . . . . . 65 Tutorial 12. Symmetric Polynomials . . . . . . . . . . . . . . . . . . . . . . . 66 Tutorial 13. Newton Polytopes . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 VIII Contents

1.6 The Division Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Tutorial 14. Implementation of the Division Algorithm . . . . . . . . 73 Tutorial 15. Normal Remainders . . . . . . . . . . . . . . . . . . . . . . . . . . 75

1.7 Gradings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Tutorial 16. Homogeneous Polynomials . . . . . . . . . . . . . . . . . . . . 83

2. Gröbner Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

2.1 Special Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Tutorial 17. Minimal Polynomials of Algebraic Numbers . . . . . . 89

2.2 Rewrite Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

Tutorial 18. Algebraic Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . 97

2.3 Syzygies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Tutorial 19. Syzygies of Elements of Monomial Modules . . . . . . . 108 Tutorial 20. Lifting of Syzygies . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

2.4 Gröbner Bases of Ideals and Modules . . . . . . . . . . . . . . . . . . . . . 110 2.4.A Existence of Gröbner Bases . . . . . . . . . . . . . . . . . . . . . . . 111 2.4.B Normal Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 2.4.C Reduced Gröbner Bases. . . . . . . . . . . . . . . . . . . . . . . . . . . 115

Tutorial 21. Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Tutorial 22. Reduced Gröbner Bases. . . . . . . . . . . . . . . . . . . . . . . 119

2.5 Buchberger’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Tutorial 23. Buchberger’s Criterion. . . . . . . . . . . . . . . . . . . . . . . . 127 Tutorial 24. Computing Some Gröbner Bases . . . . . . . . . . . . . . . 129 Tutorial 25. Some Optimizations of Buchberger’s Algorithm … 130

2.6 Hilbert’s Nullstellensatz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 2.6.A The Field-Theoretic Version . . . . . . . . . . . . . . . . . . . . . . . 134 2.6.B The Geometric Version . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Tutorial 26. Graph Colourings . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Tutorial 27. Affine Varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

3. First Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

3.1 Computation of Syzygy Modules . . . . . . . . . . . . . . . . . . . . . . . . . 148

Tutorial 28. Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Tutorial 29. Hilbert’s Syzygy Theorem . . . . . . . . . . . . . . . . . . . . . 159

3.2 Elementary Operations on Modules . . . . . . . . . . . . . . . . . . . . . . . 160 3.2.A Intersections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 3.2.B Colon Ideals and Annihilators . . . . . . . . . . . . . . . . . . . . . 166 3.2.C Colon Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

Tutorial 30. Computation of Intersections . . . . . . . . . . . . . . . . . . 174 Tutorial 31. Computation of Colon Ideals and Colon Modules . . 175

3.3 Homomorphisms of Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 3.3.A Kernels, Images, and Liftings of Linear Maps . . . . . . . . 178 3.3.B Hom-Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

Tutorial 32. Computing Kernels and Pullbacks . . . . . . . . . . . . . . 191 Tutorial 33. The Depth of a Module . . . . . . . . . . . . . . . . . . . . . . . 192

3.4 Elimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

Tutorial 34. Elimination of Module Components . . . . . . . . . . . . . 202 Tutorial 35. Projective Spaces and Graßmannians . . . . . . . . . . . . 204 Tutorial 36. Diophantine Systems and Integer Programming … 207

3.5 Localization and Saturation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 3.5.A Localization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 3.5.B Saturation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

Tutorial 37. Computation of Saturations . . . . . . . . . . . . . . . . . . . 220 Tutorial 38. Toric Ideals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

3.6 Homomorphisms of Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

Tutorial 39. Projections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Tutorial 40. Gröbner Bases and Invariant Theory . . . . . . . . . . . . 236 Tutorial 41. Subalgebras of Function Fields . . . . . . . . . . . . . . . . . 239

3.7 Systems of Polynomial Equations . . . . . . . . . . . . . . . . . . . . . . . . . 241 3.7.A A Bound for the Number of Solutions . . . . . . . . . . . . . . 243 3.7.B Radicals of Zero-Dimensional Ideals . . . . . . . . . . . . . . . . 246 3.7.C Solving Systems Effectively. . . . . . . . . . . . . . . . . . . . . . . . 254

Tutorial 42. Strange Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . 261 Tutorial 43. Primary Decompositions . . . . . . . . . . . . . . . . . . . . . . 263 Tutorial 44. Modern Portfolio Theory . . . . . . . . . . . . . . . . . . . . . . 267

A. How to Get Started with CoCoA . . . . . . . . . . . . . . . . . . . . . . . . . . 275

B. How to Program CoCoA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

C. A Potpourri of CoCoA Programs . . . . . . . . . . . . . . . . . . . . . . . . . . 293

D. Hints for Selected Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

Introduction

It seems to be a common practice of book readers to

glance through the introduction and skip the rest.

To discourage this kind of behaviour, we tried

to make this introduction sufficiently

humorous to get you hooked,

and sufficiently vague

to tempt you

to read on.

0.1 What Is This Book About?

The title of this book is “Computational Commutative Algebra 1”. In other words, it treats that part of commutative algebra which is suitable for explicit computer calculations. Or, if you prefer, the topic is that part of computer algebra which deals with commutative objects like rings and modules. Or, as one colleague put it jokingly, the topic could be called “computative algebra”.

This description immediately leads us to another question. What is commutative algebra? It is the study of that area of algebra in which the important operations are commutative, particularly commutative rings and modules over them. We shall assume throughout the book that the reader has some elementary knowledge of algebra: the kinds of objects one studies should be familiar (groups, rings, fields, etc.), as should some of the basic constructions (homomorphisms, residue class rings, etc.). The commutative algebra part of this book is the treatment of polynomials in one or more indeterminates. To put this in a more fancy way, we could say that the generality we shall be able to deal with is the theory of finitely generated modules over finitely generated algebras over a field.

This leaves us with one last unexplained part of the title. What does the “1” refer to? You guessed it! There will be a second volume called “Computational Commutative Algebra 2”. In the course of writing this book, we found that it was impossible to concentrate all the material we had planned in one volume. Thus, in the (hopefully) not so distant future we will be back with more. Meanwhile, we suggest you get acquainted with the next 300 or so pages, and we are confident that this will keep you busy for a while.

Although the fundamental ideas of Computational Commutative Algebra are deeply rooted in the development of mathematics in the 20^{th} century, their full power only emerged in the last twenty years. One central notion which embodies both the old and the new features of this subject is the notion of a Gröbner basis.

0.2 What Is a Gröbner Basis?

The theory of Gröbner bases is a wonderful example of how an idea used to solve one problem can become the key for solving a great variety of other problems in different areas of mathematics and even outside mathematics. The introduction of Gröbner bases is analogous to the introduction of i as a solution of the equation x^{2} + 1 = 0. After i has been added to the reals, the field of complex numbers arises. The astonishing fact is that in this way not only x^{2} + 1 = 0 has a solution, but also every other polynomial equation over the reals has a solution.

Suppose now that we want to address the following problem. Let

f_{1}(x_{1}, …, x_{n}) = 0, …, f_{s}(x_{1}, …, x_{n}) = 0

be a system of polynomial equations defined over an arbitrary field, and let f(x_{1}, …, x_{n}) = 0 be an additional polynomial equation. How can we decide if f(x_{1}, …, x_{n}) = 0 holds for all solutions of the initial system of equations? Naturally, this depends on where we look for such solutions. In any event, part of the problem is certainly to decide whether f belongs to the ideal I generated by f_{1}, …, f_{s}, i.e. whether there are polynomials g_{1}, …, g_{s} such that f = g_{1}f_{1} + ⋯ + g_{s}f_{s}. If f ∈ I, then every solution of f_{1} = ⋯ = f_{s} = 0 is also a solution of f = 0.

The problem of deciding whether or not f ∈ I is called the Ideal Membership Problem. It can be viewed as the search for a solution of x^{2} + 1 = 0 in our analogy. As in the case of the introduction of i, once the key tool, namely a Gröbner basis of I, has been found, we can solve not only the Ideal Membership Problem, but also a vast array of other problems.

Now, what is a Gröbner basis? It is a special system of generators of the ideal I with the property that the decision as to whether or not f ∈ I can be answered by a simple division with remainder process. Its importance for practical computer calculations comes from the fact that there is an explicit algorithm, called Buchberger’s Algorithm, which allows us to find a Gröbner basis starting from any system of generators {f_{1}, …, f_{s}} of I.

0.3 Who Invented This Theory?

As often happens, there are many people who may lay claim to inventing some aspects of this theory. In our view, the major step was taken by B. Buchberger in the mid-sixties. He formulated the concept of Gröbner bases and, extending a suggestion of his advisor W. Gröbner, found an algorithm to compute them, and proved the fundamental theorem on which the correctness and termination of the algorithm hinges.

For many years the importance of Buchberger’s work was not fully appreciated. Only in the eighties did researchers in mathematics and computer science start a deep investigation of the new theory. Many generalizations and a wide variety of applications were developed. It has now become clear that the theory of Gröbner bases can be widely used in many areas of science. The simplicity of its fundamental ideas stands in stark contrast to its power and the breadth of its applications. Simplicity and power: two ingredients which combine perfectly to ensure the continued success of this theory.

For instance, researchers in commutative algebra and algebraic geometry benefitted immediately from the appearance of specialized computer algebra systems such as CoCoA, Macaulay, and Singular. Based on advanced implementations of Buchberger’s Algorithm for the computation of Gröbner bases, they allow the user to study examples, calculate invariants, and explore objects one could only dream of dealing with before. The most fascinating feature of these systems is that their capabilities come from tying together deep ideas in both mathematics and computer science.

It was only in the nineties that the process of establishing computer algebra as an independent discipline started to take place. This contributed a great deal to the increased demand to learn about Gröbner bases and inspired many authors to write books about the subject. For instance, among others, the following books have already appeared.

1) W. Adams and P. Loustaunau, An Introduction to Gröbner Bases

2) T. Becker and V. Weispfenning, Gröbner Bases

3) B. Buchberger and F. Winkler (eds.), Gröbner Bases and Applications 4) D. Cox, J. Little and D. O’Shea, Ideals, Varieties and Algorithms

5) D. Eisenbud, Commutative Algebra with a View toward Algebraic Geometry, Chapter 15

6) B. Mishra, Algorithmic algebra

7) W. Vasconcelos, Computational Methods in Commutative Algebra and Algebraic Geometry

8) F. Winkler, Polynomial Algorithms in Computer Algebra

9) R. Fröberg, An Introduction to Gröbner Bases Is there any need for another book on the subject? Clearly we think so.

For the remainder of this introduction, we shall try to explain why. First we should explain how the contents of this book relate to the books listed above.

0.4 Now, What Is This Book Really About?

Instead of dwelling on generalities and the virtues of the theory of Gröbner bases, let us get down to some nitty-gritty details of real mathematics. Let us examine some concrete problems whose solutions we shall try to explain in this book. For instance, let us start with the Ideal Membership Problem mentioned above.

Suppose we are given a polynomial ring P = K[x_{1}, …, x_{n}] over some field K, a polynomial f ∈ P, and some other polynomials f_{1}, …, f_{s} ∈ P which generate an ideal I = (f_{1}, …, f_{s}) ⊆ P.

Question 1 How can we decide whether f ∈ I?

In other words, we are asking whether it is possible to find polynomials g_{1}, …, g_{s} ∈ P such that f = g_{1}f_{1} +⋯+g_{s}f_{s}. In such a relation, many terms can cancel on the right-hand side. Thus there is no obvious a priori bound on the degrees of g_{1}, …, g_{s}, and we cannot simply convert this question to a system of linear equations by comparing coefficients.

Next we suppose we are given a finitely generated K -algebra R specified by generators and relations. This means that we have a representation R = P/I with P and I as above.

Question 2 How can we perform addition and multiplication in R?

Of course, if f_{1}, f_{2} ∈ P are representatives of residue classes r_{1}, r_{2} ∈ R, then f_{1} + f_{2} (resp. f_{1}f_{2} ) represents the residue class r_{1} + r_{2} (resp. r_{1}r_{2} ). But this depends on the choice of representatives, and if we want to check whether two different results represent the same residue class, we are led back to Question 1. A much better solution would be to have a “canonical” representative for each residue class, and to compute the canonical representative of r_{1} + r_{2} (resp. r_{1}r_{2} ).

More generally, we can ask the same question for modules. If M is a finitely generated R-module, then M is also a finitely generated P -module via the surjective homomorphism P −↠ R, and, using generators and relations, the module M has a presentation of the form M ≅ P^{r}/N for some P -submodule N ⊆ P^{r}.

Question 3 How can we perform addition and scalar multiplication in M?

Let us now turn to a different problem. For polynomials in one indeterminate, there is a well-known and elementary algorithm for doing division with remainder. If we try to generalize this to polynomials in n indeterminates, we encounter a number of difficulties.

Question 4 How can we perform polynomial division for polynomials in n indeterminates? In other words, is there a “canonical” representation f = q_{1}f_{1} + ⋯ + q_{s}f_{s} + p such that q_{1}, …, q_{s} ∈ P and the remainder p ∈ P is “small”?

Again we find a connection with Question 2. If we can define the polynomial division in a canonical way, we can try to use the remainder p as the canonical representative of the residue class of f in R. Even if we are able to perform the basic operations in R or M, the next step has to be the possibility of computing with ideals (resp. submodules). Suppose we have further polynomials g_{1}, …, g_{t} ∈ P which generate an ideal J = (g_{1}, …, g_{t}).

Question 5 How can we perform elementary operations on ideals or submodules? More precisely, how can we compute systems of generators of the following ideals?

a) I ∩ J

b) I :_{P} J = {f ∈ P | f · J ⊆ I}

c) I :_{P} J^{∞} = {f ∈ P | f · J^{i} ⊆ I for some i ∈ ℕ}

The cases of computing I + J and I · J are obviously easy. It turns out that the keys to the solution of this last question are the answers to our next two problems, namely the problems of computing syzygy modules and elimination modules.

Question 6 How can we compute the module of all syzygies of (f_{1}, …, f_{s}), i.e. the P -module

Syz_{P} (f_{1}, …, f_{s}) = {(g_{1}, …, g_{s}) ∈ P^{s} | g_{1}f_{1} + ⋯ + g_{s}f_{s} = 0} ?

Question 7 How can we solve the Elimination Problem, i.e. for 1 ≤ m < n, how can we find the ideal I ∩ K[x_{1}, …, x_{m}]?

As we shall see, the answers to those questions have numerous applications. For instance, after we have studied the arithmetic of finitely generated K -algebras R = P/I and of finitely generated R-modules M, the next natural problem is to do computations with homomorphisms between such objects.

Suppose M_{1} = P^{r_{1}}/N_{1} and M_{2} = P^{r_{2}}/N_{2} are two finitely generated R-modules, and φ : M_{1} ⟶ M_{2} is an R-linear map which is given explicitly by an r_{2} × r_{1} -matrix of polynomials.

Question 8 How can we compute presentations of the kernel and the image of φ?

And the following question gives a first indication that we may also try to use Computational Commutative Algebra to compute objects which are usually studied in homological algebra.

Question 9 Is it possible to compute a presentation of the finitely generated P -module Hom_{P} (M_{1}, M_{2})?

Now suppose R = P/I and S = Q/J are two finitely generated K -alge-bras, where Q = K[y_{1}, …, y_{m}] is another polynomial ring and J ⊆ Q is an ideal. Furthermore, suppose that ψ : R ⟶ S is a K -algebra homomorphism which is explicitly given by a list of polynomials in Q representing the images ψ(x_{1} + I), …, ψ(x_{n} + I).

Question 10 How can we compute presentations of the kernel and the image of ψ? And how can we decide for a given element of S whether it is in the image of ψ?

Finally, one of the most famous applications of Computational Commutative Algebra is the possibility to solve polynomial systems of equations.

Question 11 How can we check whether the system of polynomial equations

f_{1}(x_{1}, …, x_{n}) = ⋯ = f_{s}(x_{1}, …, x_{n}) = 0

has solutions in \overline{K}^{n}, where \overline{K} is the algebraic closure of K, and whether the number of those solutions is finite or infinite?

Question 12 If the system of polynomial equations

f_{1}(x_{1}, …, x_{n}) = ⋯ = f_{s}(x_{1}, …, x_{n}) = 0

has only finitely many solutions (a_{1}, …, a_{n}) ∈ \overline{K}^{n}, how can we describe them? For instance, can we compute the minimal polynomials of the elements a_{1}, …, a_{n} over K? And how can we tell which of the combinations of the zeros of those polynomials solve the system of equations?

These and many related questions will be answered in this book. For a similar description of the contents of Volume 2 we refer the reader to its introduction. Here we only mention that it will contain three more chapters called Chapter IV The Homogeneous Case Chapter V Hilbert Functions Chapter VI Further Applications of Gröbner Bases

Let us end this discussion by pointing out one important choice we made. From the very beginning we have developed the theory for submodules of free modules over polynomial rings, and not just for their ideals. This differs markedly from the common practice of introducing everything only in the case of ideals and then leaving the appropriate generalizations to the reader.

Naturally, there is a trade-off involved here. We have to pay for our generality with slight complications lingering around almost every corner. This suggests that the usual exercises “left to the reader” by other authors could harbour a few nasty mines. But much more importantly, in our view Gröbner basis theory is intrinsically about modules. Buchberger’s Algorithm, his Gröbner basis criterion, and other central notions and results deal with syzygies. In any case, the set of all syzygies is a module, not an ideal. Therefore a proper introduction to Gröbner basis theory cannot avoid submodules of free modules. In fact, we believe this book shows that there is no reason to avoid them.

Finally, we would like to point out that even if you are only interested in the theory of polynomial ideals, often you still have to be able to compute with modules, for instance if you want to compute some invariants which are derived from the free resolution of the ideal. Without modules, a number of important applications of this theory would have to remain conspicuously absent!

0.5 What Is This Book Not About?

The list of topics which we do not talk about is too long to be included here, but for instance it contains soccer, chess, gardening, and our other favourite pastimes.

Computational Commutative Algebra is part of a larger field of investigation called symbolic computation which some people also call computer algebra. Covering this huge topic is beyond the scope of our book. So, what is symbolic computation about? Abstractly speaking, it deals with those algorithms which allow modern computers to perform computations involving symbols, and not only numbers.

Unlike your math teacher, computers do not object to symbolic simplification and rewriting of formulas such as

\frac{6 \4}{16 \} = 4  and  \frac{9 \5}{19 \} = 5  and  \frac{1}{6} + (\frac{1}{3} × \frac{1}{2}) = (\frac{1}{6} + \frac{1}{3}) × (\frac{1}{6} + \frac{1}{2})

More seriously, symbolic computation includes topics such as computational group theory, symbolic integration, symbolic summation, quantifier elimination, etc., which we shall not touch here.

Another circle of questions which we avoid is concerned with computability, recursive functions, decidability, and so on. Almost all of our algorithms will be formulated for polynomials and vectors of polynomials with coefficients in an arbitrary field. Clearly, if you want to implement those algorithms on a computer, you will have to assume that the field is computable. This means (approximately) that you have to be able to store an element of your field in finitely many memory cells of the computer, that you can check in finitely many steps whether two such representations correspond to the same field element, and you have to provide algorithms for performing the four basic operations +, −, ×, ÷, i.e. sequences of instructions which perform these operations in finitely many steps.

For us, this assumption does not present any problem at all, since for concrete implementations we shall always assume that the base field is one of the fields implemented in CoCoA, and those fields are computable.

Moreover, we are not going to give a detailed account of the history of the topics we discuss. Likewise, although at the end of the book you will find some references, we decided not to cite everything everywhere. More correctly, we did not cite anything anywhere. If you want additional information about the historical development, you can look into the books mentioned above. For specific references to recent research papers, we recommend that you use electronic preprint and review services. The number of papers in Computational Commutative Algebra is growing exponentially, and unlike Gröbner basis computations, it does not seem likely that it will end eventually. If all else fails, you can also drop an e-mail to us, and we will try to help you.

Finally, we do not talk about complexity issues. We shall mainly be content with proving that our algorithms terminate after finitely many steps. Unfortunately, this finite number of steps could be so large that the actual termination of the calculation occurs well beyond our lifetimes! In fact, it is known that the computation of a Gröbner basis has doubly-exponential worst-case time complexity. In layman’s terms this means that we should worry that no computation of any Gröbner basis ever terminates in our lifetimes. Fortunately, the practical experiences of mathematicians are not that dramatic. The computation of the Gröbner basis of a reasonable ideal or module usually terminates in a reasonable amount of time.

Nevertheless, it is an important topic to study how long a computer calculation will actually take. For instance, in Appendix C we give some hints which can help you speed up your CoCoA programs. The main reason that we have not delved more into complexity considerations is that we are not specialists in this subject and we feel that we cannot contribute many meaningful remarks in this direction.

If you are interested in practical applications of Computational Commutative Algebra, the complexity issues you are going to encounter are of a different nature anyway. Usually, they cannot be solved by theoretical considerations. Instead, they require a good grasp of the underlying mathematical problem and a concerted effort to improve your program code.

0.6 Are There any Applications of This Theory?

Definitely, yes! Computational Commutative Algebra has many applications, some of them in other areas of mathematics, and some of them in other sciences. Amongst others, we shall see some easy cases of the following applications.

Applications in Algebraic Geometry

• Hilbert’s Nullstellensatz (see Section 2.6)

• Affine varieties (see Tutorial 27)

• Projective spaces and Graßmannians (see Tutorial 35)

• Saturation (for computing the homogeneous vanishing ideal of a projective variety, see Section 3.5 and Volume 2)

• Systems of polynomial equations (see Section 3.7)

• Primary decompositions (for computing irreducible components of varieties, see Tutorial 43)

• Projective Varieties (see Volume 2)

• Homogenization (for computing projective closures, see Volume 2)

• Set-theoretic complete intersections (see Volume 2)

• Dimensions of affine and projective varieties (see Volume 2)

• Ideals of points (see Volume 2)

Applications in Number Theory

• Modular arithmetic, factoring polynomials over finite fields (see Tutorials 3 and 6)

• Computations in the field of algebraic numbers (see Tutorials 17 and 18)

• Magic squares (see Volume 2)

Applications in Homological Algebra

• Computation of syzygy modules (see Section 3.1)

• Kernels, images and liftings of module homomorphisms (see Section 3.3)

• Computation of Hom-modules (see Section 3.3)

• Ext-modules and the depth of a module (see Tutorial 33)

• Graded free resolutions (see Volume 2)

Applications in Combinatorics

• Monomial ideals and modules (see Section 1.3)

• Graph colourings (see Tutorial 26)

• Toric ideals (see Tutorial 38)

Practical and Other Applications

• Splines (see Tutorial 28)

• Diophantine Systems and Integer Programming (see Tutorial 36 and 38)

• Strange Polynomials (see Tutorial 42)

• Mathematical Finance: Modern Portfolio Theory (see Tutorial 44)

• Photogrammetry (see Volume 2)

• Chess Puzzles (see Volume 2)

• Statistics: Design of Experiments (see Volume 2)

• Automatic Theorem Proving (see Volume 2)

0.7 How Was This Book Written?

In our opinion, any plan for writing a book should include a set of rules which the authors intend to follow consistently. This metarule is more difficult to comply with than one thinks, and indeed many books appear to have been written in a more liberal manner. Strictly following a set of rules seems to be in contrast with the freedom of choosing different approaches to different problems. On the other hand, too much freedom sometimes leads to situations which, in our opinion, cheat the reader.

For instance, one of our most important rules is that statements called Lemma, Proposition, Theorem, etc. have to be followed by a complete proof, and the development of the theory should be as self-contained as possible. In particular, we avoid relegating proofs to exercises, giving a proof which consists of a reference which is not specific, giving a proof which consists of a reference hard to verify, because it uses different assumptions and/or notation, and giving a proof which consists of a reference to a later part of the book.

Another fundamental rule is that the notation used in this book is consistent throughout the book and always as close as possible to the notation of the computer algebra system CoCoA. It is clear that, in an emerging field like computer algebra, the notation is still in flux and few conventions hold uniformly. We think that the situation in computer algebra is even worse than elsewhere. Just look at the following table which presents the different terminologies and the notation used for some fundamental objects in our references listed in Subsection 0.3. Its second row contains our choices which agree with CoCoA.

Given a non-zero polynomial f in a polynomial ring K[x_{1}, …, x_{n}] and an ordering σ on the set of products of powers of indeterminates, we let x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} be the largest element (with respect to σ) in the support of f and c ∈ K its coefficient in f.

x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}  Notation  c · x_{1}^{α_{1}} … x_{n}^{α_{n}}  Notation
leading term  LT_{σ}(f)  (none)  LM_{σ}(f)
1) leading power product  lp(f)  leading term  lt(f)
2)  head term  HT(f)  head monomial  HM(f)
3) leading power product LPP_{≺}(f) leading monomial LM_{≺}(f)
4)  leading monomial  LM(f)  leading term  LT(f)
5)  initial monomial  (none)  initial term  in_{>}(f)
6)  head term  Hterm(f) head monomial Hmono(f)
7)  initial monomial  in(f), M(f) leading term  lt(f), L(f)
8) leading power product  lpp(f)  initial  in(f)
9)  leading monomial  lm(f)  leading term  lt(f)

A further constraint is that we have tried to structure each section according to the following scheme: introduction, body, exercises, tutorials.

The introduction describes the content in a lively style, where Italian imagination overtakes German rigour. Metaphors, sketches of examples, and psychological motivations of the themes of the section are included here. The body is the technical part of the section. It includes definitions, theorems, proofs, etc. Very few compromises with imagination are accepted here. However, we always try to liven up the text by including examples.

Nothing special needs to be said about the exercises, except maybe that they are supposed to be easy. A careful reader of the book should succeed in solving them, and to make life even easier, we include some hints for selected exercises in the text, and some more in Appendix D. Then there is one of the main features of this book which we believe to be non-standard. At the end of every section there are tutorials.

0.8 What Is a Tutorial?

Almost all books about computer algebra include some exercises which require that actual computations be performed with the help of a computer algebra system. But in our opinion, the gap between the theory and actual computations is much too wide.

First of all, the algorithms in the text are usually presented in pseudocode which, in general, is completely different from the way you write a function in a computer algebra system. In fact, we have a hard time understanding precisely what pseudocode is, because it is not rigorously defined. Instead, we have tried to present all algorithms in the same way mathematicians formulate other theorems and to provide explicit and complete proofs of their finiteness and correctness. If the reader is asked to implement a certain algorithm as a part of some tutorial or exercise, these natural language descriptions should translate easily into computer code on a step-by-step basis.

Secondly, to narrow the gap between theory and computation even more, we decided to link the tutorials and some exercises with a specific computer algebra system, namely CoCoA. This does not mean that you cannot use another computer algebra system. It only means that there definitely is a solution using CoCoA.

Every tutorial develops a theme. Sometimes we anticipate later parts of the theory, or we step out a little from the main stream and provide some pointers to applications or other areas of interest. A tutorial is like a small section by itself which is not used in the main text of the book. Some effort on the part of the reader may be required to develop a small piece of theory or to implement certain algorithms. However, many suggestions and hints in the CoCoA style are there to guide you through the main difficulties.

0.9 What Is CoCoA?

CoCoA is a computer algebra system. It is freely available and may be found on the internet at the URL

                   http://cocoa.dima.unige.it

CoCoA means “Computations in Commutative Algebra”. As we mentioned above, we suggest that you use CoCoA to solve the programming parts of the tutorials. The version of CoCoA we refer to in this book is CoCoA 4.

In Appendix A, we give some instructions on how you can download and install CoCoA on your computer. Then we show how you can start the program and how you can use it interactively. Before trying to solve the first tutorial, we think you should read through this appendix and those following it. The basic features of CoCoA, its syntax, and its data types are explained there.

If you have never used a computer algebra system before, you should definitely go through some of the examples on your computer. Play a little and get yourself acquainted with the system! Soon you will also learn how to use the on-line manual in order to get additional information.

Since the tutorials and some exercises require that you do some actual programming, we added Appendix B which gives a brief introduction to this topic. There you can find the basic commands for creating your own CoCoA functions, as well as some ideas on how you can organize your program development. In Appendix C we provide you with a number of examples of CoCoA programs which should help to get you started and which contain clues for certain tutorials.

0.10 And What Is This Book Good for?

Too often, mathematical results are terribly abused by teachers

who take a cheap shortcut and simply refer to a result from the past, from another place, another context,

totally underestimating the difficulty (and the importance) of transporting these ideas from one place to another.

When that happens, the mathematics loses, the application loses,

and most of all, the student loses. (Peter Taylor)

From the very first glimpse, it should be clear to you that this book is not a typical undergraduate text. But it is primarily intended to serve as a textbook for courses in Computational Commutative Algebra at the undergraduate or graduate level. As we explained above, we tried to avoid the traps Peter Taylor mentions. The material developed here has already been used for teaching undergraduate and graduate students with little or no experience in computer algebra.

Secondly, you can use this book for a self-guided tour of Computational Commutative Algebra. We did our best to fill it with many examples, detailed proofs, and generous hints for exercises and tutorials which should help to pave your road. This does not necessarily mean that when you work your way through the book, there will be no unexpected difficulties.

Probably you already know some of the topics we discuss. Or, maybe, you think you know them. For instance, you may have previously encountered the polynomial ring in a single indeterminate over a field such as ℚ, ℝ, or ℂ, and you may feel comfortable using such polynomials. But did you know that there are polynomials whose square has fewer terms than the polynomial itself? At first glance this seems unlikely, at second glance it may look possible, and at third glance you will still not be able to decide, because you find no example. By looking at the polynomial

f = x^{12} + \frac{2}{5} x^{11} − \frac{2}{25} x^{10} + \frac{4}{125} x^{9} − \frac{2}{125} x^{8} + \frac{2}{125} x^{7}
−\frac{3}{2750} x^{6} − \frac{1}{275} x^{5} + \frac{1}{1375} x^{4} − \frac{2}{6875} x^{3} + \frac{1}{6875} x^{2} − \frac{1}{6875} x − \frac{1}{13750}

whose square is

f^{2} = x^{24} + \frac{4}{5} x^{23} + \frac{44}{3125} x^{19} + \frac{2441}{171875} x^{18} − \frac{2016}{171875} x^{17} − \frac{16719}{37812500} x^{12}

+\frac{141}{9453125} x^{11} − \frac{3}{859375} x^{7} + \frac{13}{8593750} x^{6} + \frac{1}{4296875} x^{5} + \frac{1}{47265625} x + \frac{1}{189062500}

you can convince yourself that such a phenomenon actually occurs. But what is really surprising is that this is the simplest example possible, as we shall see in Tutorial 42.

Thus we advise you to go through the book with an open and critical mind. We have tried to fill it with a lot of hidden treasures, and we think that even if you have some previous knowledge of Computational Commutative Algebra, you will find something new or something that could change your view of one topic or another.

Last, but not least, the book can also be used as a repository of explicit algorithms, programming exercises, and CoCoA tricks. So, even if computers and programming entice you more than algebraic theorems, you will find plenty of things to learn and to do.

0.11 Some Final Words of Wisdom

Naturally, this introduction has to leave many important questions unanswered. What is the deeper meaning of Computational Commutative Algebra? What is the relationship between doing computations and proving algebraic theorems? Will this theory find widespread applications? What is the future of Computational Commutative Algebra? Instead of elaborating on these profound philosophical problems, let us end this introduction and send you off into Chapter 1 with a few words of wisdom by Mark Green.

There is one change which has overtaken commutative algebra that is in my view revolutionary in character – the advent of symbolic computation. This is as yet an unfinished revolution. At present, many researchers routinely use Macaulay, Maple, Mathematica, and CoCoA to perform computer experiments, and as more people become adept at doing this, the list of theorems that have grown out of such experiments will enlarge. The next phase of this development, in which the questions that are considered interesting are influenced by computation and where these questions make contact with the real world, is just beginning to unfold. I suspect that ultimately there will be a sizable applied wing to commutative algebra, which now exists in embryonic form.

1. Foundations

Der Ball ist rund. (Sepp Herberger)

In the introduction we have already discussed our battle plan and the main themes to be encountered, and now we are at the very start of the game. No book can be completely self-contained, and this one is no exception. In particular, we assume that the reader has some knowledge of basic algebra, but we think that she/he might feel more comfortable if we recall some fundamental definitions. Section 1.1 is specifically designed with this purpose in mind and also to present many examples. They serve as reminders of known facts for more experienced readers, and as training for beginners. The main notion recalled there is that of a polynomial, which plays a fundamental role throughout the book.

At the end of Section 1.1 we present, for the first time, a special feature of this book, namely the tutorials. Among other tasks, most tutorials require doing some programming using the computer algebra system CoCoA. As we said in the introduction, this book is not about computability, but rather about actual computations of objects related to polynomials. Therefore we are not going to discuss computability and related questions, but instead we shall develop the necessary background in Commutative Algebra and then show how you can work with it: go to your desk, turn on the computer, and work.

What are the most fundamental properties of polynomial rings over fields? One of them is certainly the unique factorization property. Section 1.2 is entirely devoted to this concept. In some sense this section can be considered as another link between very elementary notions in algebra and the themes of the book. However, the task of describing algorithms for factorizing polynomials is not taken up here. Only in a tutorial at the end of Section 1.2 do we give a guide to implementing Berlekamp’s Algorithm which computes the factorization of univariate polynomials over finite fields.

After the first two sections, the reader should be sufficiently warmed up to enter the game for real, and Section 1.3 is intended to serve this purpose. In particular, Dickson’s Lemma provides a fundamental finiteness result and gives us a first hint about how to compute with polynomial ideals and modules. Section 1.4 brings the reader into the realm of orderings. Term orderings are an important tool for actually computing, since they enable us to write polynomials in a well-defined way which can then be implemented on a computer.

After ordering the terms in polynomials or tuples of polynomials completely, their leading terms can be singled out. Section 1.5 shows how to use those leading terms to build leading term ideals and modules. Conceptually, these are simpler objects to handle than the original ideals or modules. For instance, the main result of Section 1.5 is Macaulay’s Basis Theorem which describes a basis of a quotient module in terms of a certain leading term module.

A drawback of Macaulay’s Basis Theorem is that it neither says how to compute such a basis nor how to represent the residue classes. A first attempt to overcome these difficulties is made in Section 1.6 where the reader is instructed on how to perform a division with remainder for tuples of polynomials. This procedure is called the Division Algorithm and generalizes the well-known algorithm for univariate polynomials.

However, we shall see that the Division Algorithm fails to completely solve the problem of computing in residue class modules. New forces have to be brought into play. Section 1.7, the closing section of the first chapter, serves as a preparation for further advances. It is devoted to accumulating new knowledge and to enlarging the reader’s background. More precisely, very general notions of gradings are described there. They can be used to overcome some of the difficulties encountered in Chapter 1. This goal will be the topic of subsequent chapters.

1.1 Polynomial Rings

Even the longest journey begins with the first step.

(Chinese Proverb)

As mentioned above, we think that the reader might feel more comfortable if we recall some fundamental definitions. Therefore the style of this section is slightly different from the rest of the book simply because we want to squeeze in several notions. Thus there will be more emphasis on examples than on theorems.

The main purpose of this section is to recall the notions of polynomials and polynomial rings. They are the most fundamental objects of Computational Commutative Algebra and play a central role throughout this book. It is important to clarify what we mean by a ring. Technically speaking, we mean an “associative, commutative ring with identity”.

To be a little less blunt, we should say that rings are abundant in “nature” and the reader should have already met some, for instance the rings of integers ℤ, rational numbers ℚ, real numbers ℝ, and complex numbers ℂ. One should remember that the rational numbers, the real numbers, and the complex numbers have the extra property that every non-zero element is invertible, and that they are called fields. Also all square matrices of a given size with entries in a ring form a ring with respect to the usual operations of componentwise sum and row-by-column product, but, in contrast to the previously mentioned rings, the property A · B = B · A fails, i.e. they form a non-commutative ring.

Although we shall use matrices intensively, our basic objects are polynomial rings in a finite number of indeterminates over fields. Since they are commutative rings, let us first define these objects.

Recall that a monoid is a set S, together with an operation S × S ⟶ S which is associative and for which there exists an identity element, i.e. an element 1_{S} ∈ S such that 1_{S} · s = s · 1_{S} = s for all s ∈ S. When it is clear which monoid is considered, we simple write 1 instead of 1_{S}. Furthermore, a group is a monoid in which every element is invertible, i.e. such that for all s ∈ S there exists an element s′ ∈ S which satisfies s · s′ = s′ · s = 1_{S}. A monoid is called commutative if s · s′ = s′ · s for all s, s′ ∈ S.

Definition 1.1.1. By a ring (R, +, ·) (or simply R if no ambiguity can arise) we shall always mean a commutative ring with identity element, i.e. a set R together with two associative operations +, · : R × R → R such that (R, +) is a commutative group with identity element 0, such that (R\{0}, ·) is a commutative monoid with identity element 1_{R}, and such that the distributive laws are satisfied. If no ambiguity arises, we use 1 instead of 1_{R}. A field K is a ring such that (K \ {0}, ·) is a group.

For the rest of this section, we let R be a ring. Some elements of a ring have special properties. For instance, if r ∈ R satisfies r^{i} = 0 for some i ≥ 0, then r is called a nilpotent element, and if rr′ = 0 implies r′ = 0 for all r′ ∈ R, then r is called a non-zerodivisor. A ring whose non-zero elements are non-zerodivisors is called an integral domain. For example, every field is an integral domain.

The following example is not central to the themes of this book, but it contributes to show the abundance of rings.

Example 1.1.2. Let C(ℝ) be the set of continuous functions over the reals. If we define f + g and f · g by the rules (f + g)(a) = f(a) + g(a) and (f · g)(a) = f(a) · g(a) for every a ∈ ℝ, then it is easy to see that (C(ℝ), +, ·) is a commutative ring.

Normally, when we define a new class of algebraic objects, we also want to know which maps between them respect their structure. Thus we now recall the concept of a ring homomorphism.

Definition 1.1.3. Let R, S, and T be rings.

a) A map φ : R → S is called a ring homomorphism if φ(1_{R}) = 1_{S} and for all elements r, r′ ∈ R we have φ(r + r′) = φ(r) + φ(r′) and φ(r · r′) = φ(r) · φ(r′), i.e. if φ preserves the ring operations. In this case we also call S an R-algebra with structural homomorphism φ.

b) Given two R-algebras S and T whose structural homomorphisms are φ : R ⟶ S and ψ : R ⟶ T, a ring homomorphism ϱ : S ⟶ T is called an R-algebra homomorphism if we have ϱ(φ(r)·s) = ψ(r)·ϱ(s) for all r ∈ R and all s ∈ S.

For instance, going back to Example 1.1.2, we see that the inclusion of the constant functions into C(ℝ) makes C(ℝ) an ℝ-algebra, and that the map φ : C(ℝ) ⟶ ℝ defined by φ(f) = f(0) is a ring homomorphism and also an ℝ-algebra homomorphism. For every ring R, there exists a ring homomorphism φ : ℤ ⟶ R which maps 1_{ℤ} to 1_{R}. It is called the characteristic homomorphism of R.

Sometimes a field and a group are tied together by an operation of the field on the group to produce the very well known algebraic structure of a vector space. In this case the elements of the field are called scalars, the elements of the group are called vectors, and the operation is called scalar multiplication. Those concepts generalize in the following way.

Definition 1.1.4. An R-module M is a commutative group (M, +) with an operation · : R × M → M (called scalar multiplication) such that 1 · m = m for all m ∈ M, and such that the associative and distributive laws are satisfied. A commutative subgroup N ⊆ M is called an R-submodule if we have R · N ⊆ N. If N ⊂ M then it is called a proper submodule. An R-submodule of the R-module R is called an ideal of R.

Given two R-modules M and N, a map φ : M ⟶ N is called an Rmodule homomorphism or an R-linear map if φ(m + m′) = φ(m) + φ(m′) and φ(r · m) = r · φ(m) for all r ∈ R and all m, m′ ∈ M.

Using this terminology, we can say that an R-algebra is a ring with an extra structure of an R-module such that the two structures are compatible and the usual commutative and distributive laws are satisfied.

The definition of an ideal I ⊆ R could also be rephrased by saying that a subset I of R is an ideal if it is an additive subgroup of R and R · I ⊆ I. In a field K, the only two ideals are K itself and {0}. Given any ideal I in a ring R, we can form the residue class ring R/I. It is an R-module in the obvious way. It is even an R-algebra, since the canonical map R ⟶ R/I is a ring homomorphism.

Some ideals of R have special properties. For instance, an ideal I ⊂ R is called a prime ideal if rr′ ∈ I implies r ∈ I or r′ ∈ I for all r, r′ ∈ R, and it is called a maximal ideal of R if the only ideal properly containing I is R itself. It is easy to see that I is a prime ideal if and only if R/I is an integral domain, that I is a maximal ideal if and only if R/I is a field, and hence that maximal ideals are prime ideals.

Definition 1.1.5. Let M be an R-module.

a) A set {m_{λ} | λ ∈ Λ} of elements of M is called a system of generators of M if every m ∈ M has a representation m = r_{1}m_{λ_{1}} + ⋯ + r_{n}m_{λ_{n}} such that n ∈ ℕ, r_{1}, …, r_{n} ∈ R and λ_{1}, …, λ_{n} ∈ Λ. In this case we write M = ⟨m_{λ} | λ ∈ Λ⟩. The empty set is a system of generators of the zero module {0}.

b) The module M is called finitely generated if it has a finite system of generators. If M is generated by a single element, it is called cyclic. A cyclic ideal is called a principal ideal.

c) A system of generators {m_{λ} | λ ∈ Λ} is called an R-basis of M if every element of M has a unique representation as above. If M has an R-basis, it is called a free R-module.

d) If M is a finitely generated free R-module and {m_{1}, …, m_{r}} is an Rbasis of M, then r is called the rank of M and denoted by rk(M). We remind the reader that it is known that all bases of a finitely generated free module have the same length. Hence the rank of M is well-defined.

Example 1.1.6. Finitely generated and free modules arise in a number of situations.

a) The rings ℤ and K[x] where K is a field have the property that all their ideals are principal. An integral domain with this property is called a principal ideal domain. For example, the ideal in K[x] generated by {x − x^{2}, x^{2}} is also generated by {x}.

b) The ideal (2) ⊆ ℤ is a free ℤ-module of rank one, whereas the ℤ-module ℤ/(2) is not free.

c) If K is a field and V is a K -vector space, then every K -submodule of V is free. This follows from the existence theorem for bases in vector spaces.

d) The ring R is a free R-module with basis {1}.

The following notion generalizes the vector space of n-tuples of elements in a field.

Definition 1.1.7. For n ∈ ℕ, the set R^{n} = {(r_{1}, …, r_{n}) | r_{1}, …, r_{n} ∈ R} of all n-tuples is a free R-module with respect to componentwise addition and scalar multiplication. For i = 1, …, n, let the tuple e_{i} be given by e_{i} = (0, …, 0, 1, 0, …, 0), with 1 occurring in the i^{th} position. Then the set {e_{1}, …, e_{n}} is an R-basis of R^{n}. We call it the canonical basis of R^{n}.

Now we recall the notion of a univariate polynomial ring. Since we shall use it to define multivariate polynomial rings recursively, we start with an arbitrary ring R. We consider the set R^{(ℕ)} of all sequences (r_{0}, r_{1}, …) of elements r_{0}, r_{1}, … ∈ R such that we have r_{i} ≠ 0 for only finitely many indices i ≥ 0. Using componentwise addition and scalar multiplication, this set becomes a free R-module with R-basis {e_{i} | i ∈ ℕ}, where e_{i} = (0, …, 0, 1, 0, 0, …) with 1 occurring in position i + 1. Every element of this set has a unique representation (r_{0}, r_{1}, …) = ∑_{i∈ℕ} r_{i}e_{i}. Given two elements ∑_{i∈ℕ} r_{i}e_{i} and ∑_{i∈ℕ} s_{i}e_{i}, we define

(∑_{i∈ℕ} r_{i}e_{i}) · (∑_{i∈ℕ} s_{i}e_{i}) = ∑_{i∈ℕ} (∑_{j=0}^{i} r_{j}s_{i−j}) e_{i}

Can you imagine where this strange rule comes from? (The answer to this question is given after the next definition.)

It is easy to check that the set R^{(ℕ)} , together with componentwise addition and the product defined above, is a commutative ring with identity e_{0} , and that e_{i} = e_{1}^{i} for all i ∈ ℕ. Furthermore, the map R → R^{(ℕ)} given by r ↦ r · e_{0} is an injective ring homomorphism.

Definition 1.1.8. We let R be a ring and equip R^{(ℕ)} with the ring structure defined above.

a) If we let x = e_{1} , the ring R^{(ℕ)} is called the polynomial ring in the indeterminate x over R and is denoted by R[x]. It is a commutative ring and every element of R[x] has a unique representation ∑_{i∈ℕ} r_{i}x^{i} with r_{i} ∈ R and r_{i} ≠ 0 for only finitely many indices i ∈ ℕ.

b) For n ≥ 1, we recursively define R[x_{1}, …, x_{n}] = (R[x_{1}, …, x_{n−1}])[x_{n}] and call it the polynomial ring in n indeterminates over R.

c) The elements of a polynomial ring are called polynomials. Polynomials in one indeterminate are often called univariate polynomials, while polynomials in several indeterminates are called multivariate polynomials.

Notice that, given this definition, the multiplication of two univariate polynomials ∑_{i∈ℕ} r_{i}x^{i} and ∑_{i∈ℕ} s_{i}x^{i} comes out to be ∑_{i∈ℕ}(∑_{j=0}^{i} r_{j}s_{i−j}) x^{i}, and this corresponds exactly to what we learn in high school. Many properties of a ring are inherited by polynomial rings over it. Some instances of this general phenomenon are given by the following proposition.

Proposition 1.1.9. Let R be an integral domain.

a) The units in R[x_{1}, …, x_{n}] are the units in R.

b) The polynomial ring R[x_{1}, …, x_{n}] is an integral domain.

Proof. Since R[x_{1}, …, x_{n}] was defined recursively, it suffices to prove the claims for n = 1. Given two elements f = ∑_{i∈ℕ} r_{i}x^{i} and g = ∑_{j∈ℕ} r′_{j}x^{j} in R[x] \ {0}, we let d = max{i ∈ ℕ | r_{i} ≠ 0} and e = max{j ∈ ℕ | r′_{j} ≠ 0}. Then the definition of the multiplication in R[x] implies that one of the summands in the representation of the element fg is r_{d}r′_{e}x^{d+e} ≠ 0. From this remark both claims follow immediately. □

Both statements of this proposition fail if R is not an integral domain. For instance, if R = ℤ/(4), then (1 + 2x)(1 − 2x) = 1 and 2x · (2x^{2} + 2) = 0 in R[x]. Following the recursive definition, an example of a polynomial in three indeterminates over ℚ is

f(x_{1}, x_{2}, x_{3}) = ((\frac{2}{3} − x_{1}^{3}) + (x_{1}^{4})x_{2}) + ((1 − x_{1}^{5})x_{2}^{4} − (\frac{3}{7}x_{1} + 7x_{1}^{3})x_{2}^{5}

+(x_{1}^{11})x_{2}^{7})x_{3} + ((\frac{1}{12}x_{1} − 13x_{1}^{2} + \frac{7}{67}x_{1}^{3}) + (x_{1} − \frac{3}{22}x_{1}^{3})x_{2} + (4 − x_{1})x_{2}^{2})x_{3}^{2}

+(x_{2}^{2} + (4 − \frac{8}{13}x_{1}^{9})x_{2}^{3})x_{3}^{3}

Many parentheses have to be used to represent multivariate polynomials in this way. It sure looks ugly, doesn’t it? But we can do much better. The associative and distributive laws provide us with a more compact representation. In fact, every polynomial f ∈ R[x_{1}, …, x_{n}] has a unique representation of the form

f = ∑_{α∈ℕ^{n}} c_{α}t_{α}

where α = (α_{1}, …, α_{n}) and t_{α} = x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}, and where only finitely many elements c_{α} ∈ R are different from zero. For instance, the polynomial above can be written as

f(x_{1}, x_{2}, x_{3}) = x_{1}^{11}x_{2}^{7}x_{3} − \frac{8}{13}x_{1}^{9}x_{2}^{3}x_{3}^{3} − x_{1}^{5}x_{2}^{4}x_{3} − 7x_{1}^{3}x_{2}^{5}x_{3} − \frac{3}{7}x_{1}x_{2}^{5}x_{3}

− \frac{3}{22}x_{1}^{3}x_{2}x_{3}^{2} + x_{1}^{4}x_{2} + \frac{7}{67}x_{1}^{3}x_{3}^{2} − x_{1}x_{2}^{2}x_{3}^{2} + x_{2}^{4}x_{3} + 5x_{2}^{2}x_{3}^{3}
− 13x_{1}^{2}x_{3}^{2} + x_{1}x_{2}x_{3}^{2} + 4x_{2}^{2}x_{3}^{2} − x_{1}^{3} + \frac{1}{12}x_{1}x_{3}^{2} + \frac{2}{3}

It is immediately clear that there are many different ways of writing down this polynomial depending on the ordering of the elements x_{1}^{11}x_{2}^{7}x_{3} , x_{1}^{9}x_{2}^{2}x_{3}^{3} , x_{1}^{5}x_{2}^{4}x_{3} , etc.

More generally, let r ≥ 1, and let M = (R[x_{1}, …, x_{n}])^{r} be the finitely generated free R[x_{1}, …, x_{n}]-module with canonical basis {e_{1}, …, e_{r}} such that e_{i} = (0, …, 0, 1, 0, …, 0) as in Definition 1.1.7. Then every element m ∈ M has a unique representation of the form

m = (f_{1}, …, f_{r}) = ∑_{i=1}^{r} ∑_{α∈ℕ^{n}} c_{α,i}t_{α}e_{i}

where f_{1}, …, f_{r} ∈ R[x_{1}, …, x_{n}], and where only finitely many elements c_{α,i} ∈ R are different from zero.

In these representations, we used polynomials of the form x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}, where α_{1}, …, α_{n} ∈ ℕ. Since such elements will occur frequently, we give them a name.

Definition 1.1.10. Let n ≥ 1.

a) A polynomial f ∈ R[x_{1}, …, x_{n}] of the form f = x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} such that (α_{1}, …, α_{n}) ∈ ℕ^{n} is called a term or power product. The set of all terms of R[x_{1}, …, x_{n}] is denoted by 𝕋^{n} or 𝕋(x_{1}, …, x_{n}).

b) For a term t = x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} ∈ 𝕋^{n}, the number deg(t) = α_{1} + ⋯ + α_{n} is called the degree of t.

c) The map log : 𝕋^{n} → ℕ^{n} defined by x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} ↦ (α_{1}, …, α_{n}) is called the logarithm.

d) If r ≥ 1 and M = (R[x_{1}, …, x_{n}])^{r} is the finitely generated free R[x_{1}, …, x_{n}]-module with canonical basis {e_{1}, …, e_{r}}, then a term of M is an element of the form te_{i} such that t ∈ 𝕋^{n} and 1 ≤ i ≤ r. The set of all terms of M will be denoted by 𝕋^{n}⟨e_{1}, …, e_{r}⟩ or by 𝕋(x_{1}, …, x_{n})⟨e_{1}, …, e_{r}⟩.

The set 𝕋^{n} is a commutative monoid. Its identity element is 1 = x_{1}^{0} ⋯ x_{n}^{0} . The monoid 𝕋^{n} does not depend on the ring of coefficients R. The set 𝕋^{n}⟨e_{1}, …, e_{r}⟩ can be considered as the disjoint union of r copies of 𝕋^{n} where the symbols e_{1}, …, e_{r} simply indicate which copy of 𝕋^{n} we are considering.

Definition 1.1.11. Let n ≥ 1, let f = ∑_{α∈ℕ^{n}} c_{α}t_{α} ∈ R[x_{1}, …, x_{n}] be a polynomial, and let m = ∑_{i=1}^{r} ∑_{α∈ℕ^{n}} c_{α,i}t_{α}e_{i} ∈ M = (R[x_{1}, …, x_{n}])^{r}.

a) For every α ∈ ℕ^{n},i ∈ {1, …, r}, the element c_{α,i} ∈ R is called the coefficient of the term t_{α}e_{i} in m.

b) The set {t_{α}e_{i} ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ | c_{α,i} ≠ 0} is called the support of m and denoted by Supp(m).

c) If f ≠ 0, the number max{deg(t_{α}) | t_{α} ∈ Supp(f)} is called the degree of f and denoted by deg(f).

For example, the support of the polynomial f ∈ ℚ[x_{1}, x_{2}, x_{3}] above consists of 17 terms, and the sequence of their degrees is 19, 15, 10, 9, 7, 6, 5, 5, 5, 5, 5, 4, 4, 4, 3, 3, 0. We have ordered the terms in Supp(f) by decreasing degree. However, this is not enough to order them completely since there are several terms with the same degree. Complete orderings on 𝕋^{n} and 𝕋^{n}⟨e_{1}, …, e_{r}⟩ will be examined in Section 1.4.

The polynomial ring can be used to define interesting ring homomorphisms. One of its fundamental properties, called the Universal Property, says that ring homomorphisms starting from a polynomial ring are uniquely defined by the images of the indeterminates, and those images may be chosen freely.

Proposition 1.1.12. (Universal Property of the Polynomial Ring) Let S be an R-algebra with structural homomorphism φ : R → S, let n ≥ 1, and let s_{1}, …, s_{n} be elements in S. Then there exists a unique ring homomorphism ψ : R[x_{1}, …, x_{n}] → S such that ψ|_{R} = φ and ψ(x_{i}) = s_{i} for i = 1, …, n.

Proof. By induction, it suffices to prove the claim for n = 1. For d ≥ 0 and c_{0}, …, c_{d} ∈ R, we let ψ(∑_{i=0}^{d} c_{i}x_{1}^{i}) = ∑_{i=0}^{d} φ(c_{i})s_{1}^{i}. It is easy to check that this defines a ring homomorphism having the required properties. On the other hand, since ψ has to be compatible with addition and multiplication, this definition is forced upon us and ψ is uniquely determined. □

A ring homomorphism ψ defined in this way is also called an evaluation homomorphism, and the image of a polynomial f is called the evaluation f(s_{1}, …, s_{n}) of f at (s_{1}, …, s_{n}). In the special case when S = R, an evaluation homomorphism ψ : R[x_{1}, …, x_{n}] ⟶ R is also called a substitution homomorphism. Using evaluations, we can speak about generators of R-algebras in the following manner.

Definition 1.1.13. Let S be an R-algebra.

a) A set {s_{λ} | λ ∈ Λ} of elements of S is called a system of generators of S if for every element s ∈ S there is a finite subset {λ_{1}, …, λ_{t}} of Λ and a polynomial f(x_{1}, …, x_{t}) ∈ R[x_{1}, …, x_{t}] such that s = f(s_{λ_{1}}, …, s_{λ_{t}}).

b) The R-algebra S is called finitely generated if it has a finite system of generators.

Corollary 1.1.14. An R-algebra S is finitely generated if and only if there exists a number n ∈ ℕ and a surjective R-algebra homomorphism φ : R[x_{1}, …, x_{n}] ⟶ S.

In other words, every finitely generated R-algebra S is of the form S ≅ R[x_{1}, …, x_{n}]/I where I is an ideal in R[x_{1}, …, x_{n}].

Proof. This follows from the fact that a set {s_{1}, …, s_{n}} of elements of S is a system of generators of S if and only if the R-algebra homomorphism φ : R[x_{1}, …, x_{n}] ⟶ S defined by x_{i} ⟼ s_{i} for i = 1, …, n is surjective.

□

For an R-algebra S which has a finite system of generators {s_{1}, …, s_{n}}, the corresponding isomorphism S ≅ R[x_{1}, …, x_{n}]/I is called a presentation of S by generators and relations, and the ideal I is called the ideal of algebraic relations among {s_{1}, …, s_{n}} with coefficients in R.

Exercise 1. Let d ∈ ℤ be a non-square number, and let K = ℚ[\sqrt{d}], where we use \sqrt{d} = i·\sqrt{−d} if d < 0. Prove that K is a field, and that every element r ∈ K has a unique representation r = a + b\sqrt{d} with a, b ∈ ℚ. The field K is called the quadratic number field generated by \sqrt{d}. After representing r, s ∈ K by pairs of rationals, give formulae for r + s, −r, r · s, and \frac{1}{r} for r ≠ 0.

Exercise 2. Show that, up to a unique isomorphism, the polynomial ring R[x_{1}, …, x_{n}] is the only R-algebra satisfying the universal property stated in Proposition 1.1.12. In other words, suppose that T is another R-algebra together with elements t_{1}, …, t_{n} ∈ T , such that whenever you have an R-algebra S together with elements s_{1}, …, s_{n} ∈ S, then there exists a unique R-algebra homomorphism ψ : T → S satisfying ψ(t_{i}) = s_{i} for i = 1, …, n. Then show that there is a unique R-algebra isomorphism R[x_{1}, …, x_{n}] → T such that x_{i} ↦ t_{i} for i = 1, …, n.

Exercise 3. Show that the map log : 𝕋^{n} ⟶ ℕ^{n} is an isomorphism of monoids.

Exercise 4. Let v_{1} = (a_{11}, a_{21}, …, a_{n1}), …, v_{n} = (a_{1n}, a_{2n}, …, a_{nn}) be elements of ℤ^{n}, and let A = (a_{ij}) ∈ Mat_{n}(ℤ) be the matrix whose columns are the coordinates of v_{1}, …, v_{n}. Show that the set {v_{1}, …, v_{n}} is a ℤ-basis of ℤ^{n} if and only if det(A) ∈ {1, −1}.

Exercise 5. Let S be the set of functions from ℤ to ℤ.

a) Show that S with the usual sum and product of functions is a ℤalgebra.

b) Use considerations about the cardinality of S to show that S is not a finitely generated ℤ-algebra.

Exercise 6. Let R be a ring and I a non-zero ideal of R. Prove that I is a free R-module if and only if it is a principal ideal generated by a non-zerodivisor.

Exercise 7. Let R be a ring. Show that the following conditions are equivalent.

a) The ring R is a field.

b) Every finitely generated R-module is free.

c) Every cyclic R-module is free.

Exercise 8. Let K be a field, P = K[x_{1}, x_{2}], and I be the ideal in P generated by {x_{1}, x_{2}}. Show that I is not a free P -module.

Tutorial 1: Polynomial Representation I

In what follows we work over the ring K[x, y], where K is one of the fields defined in CoCoA. Using Definition 1.1.8, we see that we can represent every polynomial f ∈ K[x, y] as a list of lists, where a univariate polynomial a_{0} + a_{1}x + ⋯ + a_{d}x^{d} such that a_{0}, …, a_{d} ∈ K and a_{d} ≠ 0 is represented by the list [a_{0}, …, a_{d}].

The purpose of this tutorial is to program the transition from polynomials to lists (and back), and to see how addition and multiplication of polynomials can be carried out using their list representations. Thus this tutorial is mainly intended as an introduction to the kind of CoCoA programming we ask you to do in other tutorials.

There are solutions of parts of this tutorial in Appendix C.1. Since most programs require the use of lists, we suggest you read Appendices A.6 and B.5 before you start. A (long) list of CoCoA commands for dealing with lists can be generated by invoking the on-line manual with the command

H.Commands('list');

a) Write a CoCoA program ReprUniv(…) which takes two arguments: the first argument should be a univariate polynomial over K, and the second one should be the indeterminate occurring in it. If the polynomial is f = a_{0} + a_{1}x + ⋯ + a_{d}x^{d}, the program should return the list [a_{0}, …, a_{d}] representing this polynomial. Hint: There is a pedestrian solution involving a For-loop and the CoCoA function CoeffOfTerm(…) and an elegant one using the command

Coefficients(. . .).

b) Implement also a CoCoA function ListToPoly(…) which takes a list of numbers and constructs the corresponding univariate polynomial in the indeterminate x. Use this function and ReprPoly(…) to convert the polynomials f_{1} = x^{4} + 3x^{2} − x + 1 and f_{2} = y^{2} + 2y + 3 to lists and back. Hint: A simple For-loop or the sum over an appropriately constructed list will do the trick.

c) Write CoCoA functions AddUniv(…) and MultUniv(…) which take two lists representing univariate polynomials and compute the lists representing their sum and product, respectively. Use the program ListToPoly(…) to check the correctness of both functions. Hint: When implementing the sum, you should switch the summands such that the first one has larger degree (i.e. a longer list). Then you can add the elements of the second list onto the first one. For the implementation of the product, you may want to consider the formula (a_{0} + ⋯ + a_{d}x^{d}) · (b_{0} + ⋯ + b_{e}x^{e}) = ∑_{i=0}^{d+e}(∑_{j=0}^{i} a_{j}b_{i−j}) · x^{i}. It may be useful to bring both lists to the same length first (by appending zeros). The inner sum could be realized by a construction like Sum(L), where L is the list of all a_{j}b_{i−j}.

d) Write a CoCoA program ReprPoly(…) which represents a polynomial f ∈ K[x, y] as a list of lists of elements of K. The elements of the big list are lists representing univariate polynomials in K[x], namely the coefficients of the different powers of y in the polynomial, considered as an element of (K[x])[y] as in Definition 1.1.8.b. For instance, the polynomial f_{1} = x^{2} + 2xy + 3y^{2} is represented by the list of lists [[0, 0, 1], [0, 2], [3]].

Hint: The CoCoA command Deg(F,x) returns the degree of a polynomial F with respect to the indeterminate x. The function Shorten(…) in Appendix C.1 removes trailing zeros from a list. These facts and a double For-loop are good enough for a first solution. More elegantly, you can also use Reversed(Coefficients(…)) and a clever list construction.

e) Write a CoCoA program ListListToPoly(…) which converts lists of lists back to polynomials in K[x, y].

f) Apply the programs ReprPoly(…) and ListListToPoly(…) to the polynomials f_{1} = x^{2} + 2xy + 3y^{2} , f_{2} = y^{2} − x^{4} , and f_{3} = 1 + x + y + x^{2} + y^{2} + x^{4} + y^{4} + x^{8} + y^{8} .

g) Write CoCoA-programs AddPoly(…) and MultPoly(…) which take two lists L_{1}, L_{2} representing polynomials in K[x, y] and compute the lists representing their sum and product, respectively.

h) Check the correctness of your programs by converting f_{1} + f_{2} , f_{1} · f_{2} and f_{2}f_{3} + f_{1}^{3} into lists in two ways.

i) (For more advanced programmers) Using recursive programming, redo parts d), e), and g) for polynomials in K[x_{1}, …, x_{n}]. Try these functions in some concrete examples and show that they are correct.

Tutorial 2: The Extended Euclidean Algorithm

There is a well-known algorithm for computing the greatest common divisor of two positive integers called the Euclidean Algorithm. In this tutorial we shall extend it and use the extended version to show how to implement the basic operations of a field of type 𝔽_{p} = ℤ/(p).

a) Let a, b ∈ ℤ. Consider the following sequence of instructions.

1) If a = b = 0, return 0. If a = 0 and b ≠ 0, return |b|. If a ≠ 0 and b = 0, return |a|. Otherwise replace a and b by their absolute values and form the pair (a, b) ∈ ℕ^{2} .

2) If a > b, interchange a and b.

3) Compute a representation b = qa + r with q ∈ ℕ and a remainder 0 ≤ r < a. If r = 0, return a. If r ≠ 0, replace (a, b) by (r, a) and repeat step 3).

Show that this is an algorithm which stops after finitely many steps and returns gcd(a, b), i.e. the greatest common divisor of a and b. (We use gcd(0, 0) = 0.) It is called the Euclidean Algorithm.

b) Write a CoCoA function Euclid(…) which implements the algorithm of a).

c) Prove that, for a, b ∈ ℤ, there exist c, d ∈ ℤ such that ac+bd = gcd(a, b).

d) Let a, b ∈ ℤ. Consider the following sequence of instructions.

1) If a = b = 0, return the triple (0, 0, 0). If a = 0 and b ≠ 0, return the triple (0, \frac{|b|}{b}, |b|). If a ≠ 0 and b = 0, return the triple (\frac{|a|}{a}, 0, |a|).

2) Form the triples (c_{0}, d_{0}, e_{0}) = (\frac{|a|}{a}, 0, |a|) and (c_{1}, d_{1}, e_{1}) = (0, \frac{|b|}{b}, |b|).

3) Check whether e_{1} ≤ e_{0} . If this is not the case, interchange (c_{0}, d_{0}, e_{0}) and (c_{1}, d_{1}, e_{1}).

4) Write e_{0} in the form e_{0} = qe_{1} + r, where q ∈ ℕ and 0 ≤ r < e_{1} . Then form (c_{2}, d_{2}, e_{2}) = (c_{0} − qc_{1}, d_{0} − qd_{1}, r).

5) Replace (c_{0}, d_{0}, e_{0}) by (c_{1}, d_{1}, e_{1}) and (c_{1}, d_{1}, e_{1}) by (c_{2}, d_{2}, e_{2}).

6) Repeat steps 4) and 5) until e_{1} = 0. Then return the triple (c_{0}, d_{0}, e_{0}) and stop.

Show that this is an algorithm, called the Extended Euclidean Algorithm, i.e. that it stops after finitely many steps, and that it computes a triple (c, d, e) ∈ ℤ^{3} such that e = gcd(a, b) and ac + bd = e.

e) Write a CoCoA function ExtEuclid(…) which implements the algorithm in d).

f) Explain how one can modify the Extended Euclidean Algorithm so that it applies to univariate polynomials over a field K. Write a CoCoA function PolyExtEuclid(…) which performs this computation. Hint: Use the built-in CoCoA function DivAlg(…) to do the division with remainder.

g) Every element of ℤ/(p) can be uniquely represented by one of the integers in {0, 1, …, p−1}. Write CoCoA functions ZpAdd(…), ZpMult(…), ZpNeg(…), and ZpInv(…) which compute addition, multiplication, negatives, and inverses in ℤ/(p) using this representation. Do not use the built-in modular arithmetic of CoCoA, but find direct methods.

Tutorial 3: Finite Fields

In Tutorial 2 we showed how to perform actual computations in the finite fields of type ℤ/(p). The purpose of this tutorial is to build upon that knowledge and show how it is possible to compute in more general finite fields. Let p > 1 be a prime number.

(Note: Several parts require some basic knowledge of field theory.)

a) Let K be a finite field of characteristic p. Show that the number q of elements of K is a power of p, i.e. there is a number e > 0 such that q = p^{e}. (Hint: Note that K is a ℤ/(p)-vector space.)

b) Let L be an algebraically closed field of characteristic p. Prove that there exists a unique subfield 𝔽_{q} of L which has q elements, and that it is the set of roots of the equation x^{q} − x = 0.

c) Show that every field K with q elements is isomorphic to 𝔽_{q}, that there is an irreducible polynomial f of degree e in ℤ/(p)[x], and that there is an isomorphism K ≅ ℤ/(p)[x]/(f). Hint: For the second part, use the fact that the multiplicative group K \ {0} is cyclic. d) Implement a CoCoA function IrredPoly(…) which computes the list of

all monic irreducible polynomials f of degree d = deg f ≤ e in ℤ/(p)[x], i.e. whose coefficient of x^{d} is 1. Proceed degree by degree, starting with [x, x − 1, …, x − p + 1] and appending the list of all monic polynomials of degree d which are not divisible by one of the irreducible polynomials of degree ≤ d/2.

e) Using f = Last(IrredPoly(…)), we can represent every element r ∈ K as a list r = [r_{1}, …, r_{e}] of elements r_{1}, …, r_{e} ∈ ℤ/(p) such that r+(f) = r_{1} +r_{2}x+⋯+r_{e}x^{e−1} +(f). Write CoCoA functions FFAdd(…), FFNeg(…), FFMult(…), and FFInv(…) which compute the lists representing the sums, negatives, products, and inverses of elements of K, respectively. (Hint: Use the base ring S::=Z/(P)[x].)

f) Compute a representation of the field 𝔽_{16} and its multiplication table.

1.2 Unique Factorization

Everything should be made

as simple as possible, but not simpler. (Albert Einstein)

In this section we discuss a fundamental property of polynomial rings over fields, namely the unique factorization property. One learns in school that for every integer n we may write n = p_{1}^{α_{1}}p_{2}^{α_{2}} ⋯ p_{s}^{α_{s}}, where p_{1}, …, p_{s} are prime numbers. For instance, 504 = 2^{3} · 3^{2} · 7. Moreover, such a factorization is unique up to sign changes and order, for instance 504 = (−2)^{3} ·(−7)·3^{2} . The main topic in this section is to prove that polynomial rings have the same property.

The spirit of the section is to give an account of the theory underlying this notion which is as simple as possible, but not simpler. Once it is known that polynomial rings over fields have the unique factorization property, the next question is how to compute factorizations of polynomials effectively. The treatment of that question goes beyond the scope of this book. However, in Tutorial 6 we give some hints on how to do it for univariate polynomials over ℤ/(p).

Other notions which everyone learns in school are the least common multiple and greatest common divisor of natural numbers. We show that factorial rings provide a suitable environment for defining such concepts (see Definition 1.2.6) and we prove some of their basic properties (see Proposition 1.2.8). Other subjects related to the unique factorization property will be considered in the exercises and tutorials.

Now, let us do first things first and introduce the notions of irreducible and prime elements in such a way that it is possible to speak about factorizations.

Definition 1.2.1. Let R be an integral domain and r ∈ R \ {0} be a nonunit.

a) The element r is said to be reducible, if it can be expressed as the product of two elements neither of which is a unit. Otherwise it is called irreducible.

b) If r = u·r_{1}·r_{2} ⋯ r_{s} with a unit u ∈ R and irreducible elements r_{1}, …, r_{s}, then such an expression is called a factorization of r.

c) If r has the property that r | r_{1} · r_{2} implies r | r_{1} or r | r_{2} for all r_{1}, r_{2} ∈ R, then r is called a prime (or a prime element) of R.

For a unit r ∈ R, we shall call r = r a factorization of r. We observe that the only divisors of an irreducible element are the units and the element itself.

Proposition 1.2.2. In the polynomial ring K[x] in one indeterminate over a field K, a non-zero non-unit element is a prime if and only if it is irreducible.

Proof. The only non-trivial implication is to show that if f is irreducible, then it is a prime. We have already mentioned (see Example 1.1.6) that if K is a field, then every ideal in K[x] is principal. Suppose f is irreducible, f | ab, and f ∤ a. Then ab = gf for some g ∈ K[x]. Since the ideal (a, f) is generated by a divisor of f, we have (a, f) = (1), and therefore 1 = ra + sf for some r, s ∈ K[x]. Thus we get b = rab + sbf = rgf + sbf and f | b. □

In Exercise 9 we will see an element of an integral domain which is irreducible but not prime. The following example shows that the notion of irreducibility in a polynomial ring depends strongly on the field of coefficients.

Example 1.2.3. In the ring ℝ[x] the element x^{2} + 1 is irreducible. On the other hand, in the ring ℂ[x], we have x^{2} + 1 = (x + i)(x − i), hence it is reducible. It is clear that other factorizations of x^{2} + 1 are for instance (i − x)(−i − x) and (2x + 2i)(1/2x − 1/2i), but it is also clear that these factorizations are basically the same, i.e. they differ only by changing the factors by units.

This leads to the following definition.

Definition 1.2.4. Let R be an integral domain. Then R is said to be factorial, or a factorial domain, or a unique factorization domain if every non-unit in R \ {0} has a unique factorization up to order and units.

For example, every field is trivially a factorial domain. In order to find less trivial examples, we want to study how this uniqueness of factorizations relates to the notions of irreducible and prime elements.

Proposition 1.2.5. Let R be an integral domain with the property that every non-zero non-unit has a factorization. Then the following conditions are equivalent.

a) The ring R is factorial.

b) Every irreducible element of R is a prime.

Proof. Let R be factorial, and let r ∈ R be an irreducible element. Suppose r | ab. Hence we have an equation ab = cr with non-units a, b, c ∈ R \ {0}. Then the irreducible factor r must show up either in the factorization of a or in that of b. Therefore we have either r | a or r | b which shows that r is a prime.

Conversely, let a_{1}a_{2} ⋯ a_{s} = b_{1}b_{2} ⋯ b_{t} be factorizations of the same element. We see that b_{1}b_{2} ⋯ b_{t} ∈ (a_{1}), hence the assumption implies that one of the factors has to be in (a_{1}). Up to a permutation of the factors we may assume that b_{1} ∈ (a_{1}). Since both a_{1} and b_{1} are irreducible, they are equal up to a unit and can be cancelled in the equation a_{1}a_{2} ⋯ a_{s} = b_{1}b_{2} ⋯ b_{t}. Continuing in this way, we can see that the two factorizations are essentially the same. □

As with integers, it is possible to define greatest common divisors and least common multiples in a factorial domain.

Definition 1.2.6. Let R be a factorial domain. We say that two irreducible elements of R are associated if they differ only by multiplication with a unit of R. Let the set P ⊆ R be obtained by picking one element in each class of associated irreducible elements of R. Furthermore, let m ≥ 2 and f_{1}, …, f_{m} ∈ R \ {0}.

a) Let f_{1} = c_{1} ∏_{p∈P} p^{α_{p}} and f_{2} = c_{2} ∏_{p∈P} p^{β_{p}} be factorizations of f_{1} and f_{2} with units c_{1}, c_{2} ∈ R, with α_{p}, β_{p} ∈ ℕ, and with α_{p} = β_{p} = 0 for all but finitely many p ∈ P. Then the element

gcd(f_{1}, f_{2}) = ∏_{p∈P} p^{min{α_{p},β_{p}}}

is called a greatest common divisor of f_{1} and f_{2} , and the element

lcm(f_{1}, f_{2}) = ∏_{p∈P} p^{max{α_{p},β_{p}}}

is called a least common multiple of f_{1} and f_{2} .

b) If gcd(f_{1}, f_{2}) = 1, we say that f_{1}, f_{2} are coprime or relatively prime.

c) For m > 2, we define a greatest common divisor and a least common multiple of f_{1}, …, f_{m} recursively by

gcd(f_{1}, …, f_{m}) = gcd(gcd(f_{1}, …, f_{m−1}), f_{m})
lcm(f_{1}, …, f_{m}) = lcm(lcm(f_{1}, …, f_{m−1}), f_{m})

d) Let f = c ∏_{p∈P} p^{α_{p}} with a unit c ∈ R, with α_{p} ∈ ℕ, and with α_{p} = 0 for all but finitely many p ∈ P be the decomposition of an element f ∈ R \ {0} into irreducible factors. Then the element

sqfree(f) = ∏_{p∈P} p^{min{1,α_{p}}}

is called a squarefree part of f.

It is clear that the definition of greatest common divisors and least common multiples does not depend on the order of the elements. It is also clear that greatest common divisors, least common multiples, and squarefree parts of elements f_{1}, …, f_{m} ∈ R\{0} change only by a unit if we choose a different set of representatives P for the equivalence classes of irreducible elements. We shall therefore speak of the greatest common divisor and the least common multiple of f_{1}, …, f_{m} ∈ R\{0}, as well as the squarefree part of f ∈ R\{0}, while always keeping in mind that they are unique only up to a unit.

In the following, we describe some connections between greatest common divisors, least common multiples, and ideal theory. First we characterize greatest common divisors and least common multiples by divisibility properties.

Proposition 1.2.7. (Characterization of gcd and lcm)

Let R be a factorial domain, and let f_{1}, …, f_{m} ∈ R \ {0}

a) An element f ∈ R is the greatest common divisor of f_{1}, …, f_{m} if and only if f | f_{i} for i = 1, …, m and every element g ∈ R such that g | f_{i} for i = 1, …, m satisfies g | f.

b) An element f ∈ R is the least common multiple of f_{1}, …, f_{m} if and only if f_{i} | f for i = 1, …, m and every element g ∈ R such that f_{i} | g for i = 1, …, m satisfies f | g.

Proof. First we prove a). For i = 1, …, m, let f_{i} = c_{i} ∏_{p∈P} p^{α_{pi}} be the factorization of f_{i}. Using the definition and induction on m, we see that gcd(f_{1}, …, f_{m}) = ∏_{p∈P} p^{min{α_{p1},...,α_{pm}}}. Thus it follows immediately that gcd(f_{1}, …, f_{m}) divides f_{i} for i = 1, …, m.

Now let g ∈ R be a common divisor of f_{1}, …, f_{m}, and let g = c ∏_{p∈P} p^{β_{p}} be the factorization of g. For every i ∈ {1, …, m}, the condition g | f_{i} implies that β_{p} ≤ α_{pi} for all p ∈ P. Hence we get β_{p} ≤ max{α_{p1}, …, α_{pm}} for all p ∈ P, and therefore g | gcd(f_{1}, …, f_{m}).

The proof of claim b) follows in exactly the same way. □

Proposition 1.2.8. Let R be a factorial domain and f_{1}, …, f_{m} ∈ R \ {0}.

a) The element lcm(f_{1}, …, f_{m}) generates the ideal (f_{1}) ∩ ⋯ ∩ (f_{m}).

b) We have gcd(f_{1}, f_{2}) = f_{1}f_{2}/ lcm(f_{1}, f_{2}).

c) Suppose R is a principal ideal domain. Then gcd(f_{1}, …, f_{m}) generates the ideal (f_{1}, …, f_{m}). In particular, we have gcd(f_{1}, …, f_{m}) = 1 if and only if there are elements g_{1}, …, g_{m} ∈ R such that g_{1}f_{1}+⋯+g_{m}f_{m} = 1.

Proof. Since least common multiples were defined recursively, it suffices to prove claim a) for m = 2. Let f_{1} = c_{1}p_{1}^{α_{1}} ⋯ p_{s}^{α_{s}} and f_{2} = c_{2}p_{1}^{β_{1}} ⋯ p_{s}^{β_{s}} be factorizations of f_{1} and f_{2} , where c_{1}, c_{2} ∈ R are units, where α_{i}, β_{j} ≥ 0, and where p_{1}, …, p_{s} ∈ R are irreducible elements representing s different equivalence classes. Note that lcm(f_{1}, f_{2}) = p_{1}^{max{α_{1},β_{1}}} ⋯ p_{s}^{max{α_{s},β_{s}}} is divisible by both f_{1} and f_{2} , i.e. it is in (f_{1}) ∩ (f_{2}). Conversely, every element in (f_{1}) ∩ (f_{2}) is divisible by p_{i}^{α_{i}} and p_{i}^{β_{i}} for i = 1, …, s, and therefore by p_{i}^{max{α_{i},β_{i}}}. Thus every element in (f_{1}) ∩ (f_{2}) is a multiple of lcm(f_{1}, f_{2}).

The proof of b) follows from the fact that α_{i} + β_{i} = min{α_{i}, β_{i}} + max{α_{i}, β_{i}} for i = 1, …, s. Finally, to show c), we note that any element of (f_{1}, …, f_{m}) is a multiple of gcd(f_{1}, …, f_{m}). Conversely, let h ∈ R be a generator of (f_{1}, …, f_{m}). Since h | f_{i} for i = 1, …, m, we have h | gcd(f_{1}, …, f_{m}). Thus we get gcd(f_{1}, …, f_{m}) ∈ (h) = (f_{1}, …, f_{m}), as claimed. □

Now it is time to move directly to the heart of this section. We want to prove that polynomial rings over fields are factorial. The next lemma is the key to this proof.

Definition 1.2.9. Let R be a factorial domain and f ∈ R[x] \ {0}. A greatest common divisor of the coefficients of f is called a content of f. As before, we usually speak of the content of f and denote it by cont(f). If cont(f) = 1, we say that f is primitive.

Lemma 1.2.10. (Gauß’s Lemma) Let R be a factorial domain, and let f, g ∈ R[x] be non-zero polynomials.

a) We have cont(fg) = cont(f) · cont(g).

b) If f, g are primitive, so is fg.

Proof. It is clear that a) follows from b), since every polynomial f is of the form f = cont(f) · f̃ for some primitive polynomial f̃. So, let us prove b). We write f = ∑_{i∈ℕ} r_{i}x^{i} and g = ∑_{i∈ℕ} s_{i}x^{i} with r_{i}, s_{i} ∈ R. Let p be an irreducible element of R. The hypothesis implies that the numbers j = min{i ∈ ℕ | p ∤ r_{i}} and k = min{i ∈ ℕ | p ∤ s_{i}} exist. Now R is factorial and p is irreducible, hence prime. As it does not divide r_{j} and s_{k}, it does not divide r_{j} · s_{k} either. The choice of j and k yields that p does not divide the coefficient of x^{j+k} in fg. Therefore it does not divide cont(fg), and we are done. □

Lemma 1.2.11. Let R be a factorial domain. Then every non-zero element of R[x] has a factorization.

Proof. Let f ∈ R[x]\{0} be a non-unit. Since f is of the form f = cont(f)·g with a primitive polynomial g, and since cont(f) has a factorization by assumption, we may assume that f is primitive.

We proceed by induction on d = deg(f). If d = 0 then f = cont(f) = 1 has a trivial factorization. If d > 0 and f is irreducible, there is nothing to prove. Otherwise, let f = gh with non-units g, h ∈ R[x] \ {0}. If one of the two, say g, has degree zero, i.e. if g ∈ R, then 1 = cont(f) = g · cont(h), contradicting the fact that g is not a unit. Thus the degrees of g and h are both strictly less than d, and an application of the inductive hypothesis finishes the proof. □

Proposition 1.2.12. Let R be a factorial domain. Then R[x] is also a factorial domain.

Proof. According to Proposition 1.2.5 and Lemma 1.2.11, we have to prove that every irreducible polynomial in R[x] is prime. Let Q(R) be the field of fractions of R. In order to prove the claim, we shall argue as follows: if f is an irreducible element of R[x], we show that it is irreducible in Q(R)[x], hence prime in Q(R)[x]. Finally, we infer from this that f is prime in R[x].

Let f be an irreducible element in R[x]. Then it is clear that f is primitive. Suppose we have in Q(R)[x] an equation f = g_{1}h_{1} with non-zero and non-invertible polynomials g_{1}, h_{1} ∈ Q(R)[x]. Then g_{1} and h_{1} are of positive degree. By possibly clearing the denominators, we see that there exists an element r ∈ R such that rf = g_{2}h_{2} with g_{2}, h_{2} ∈ R[x]. From Lemma 1.2.10 we know that r = cont(g_{2}) · cont(h_{2}). Thus we can simplify and get a new equation f = g_{3}h_{3} with primitive polynomials g_{3}, h_{3} ∈ R[x]. Since the degrees of g_{3} and h_{3} are positive and R is an integral domain, neither is a unit, contradicting the irreducibility of f. Thus we have shown that f is irreducible in Q(R)[x].

The ring Q(R)[x] is a univariate polynomial ring over a field, hence in Q(R)[x] every irreducible element is prime (see Proposition 1.2.2). Consequently, the polynomial f is prime in Q(R)[x]. It remains to show that f is prime as an element of R[x]. We start with an equation ef = gh, where e, g, h ∈ R[x]. If we read it in Q(R)[x], we deduce that g or h must be a multiple of f in Q(R)[x]. Assume for instance that g = qf with q ∈ Q(R)[x]. By clearing the denominators, we get rg = pf for some r ∈ R and p ∈ R[x]. Therefore we have r · cont(g) = cont(p), and after cancelling r we obtain g ∈ (f), as was to be shown. □

By repeatedly applying the previous proposition, we see that polynomial rings over fields are factorial domains. This is one of their fundamental properties and deserves to be the final theorem of the present section.

Theorem 1.2.13. Let K be a field and n ≥ 1. Then the polynomial ring K[x_{1}, …, x_{n}] is a factorial domain.

Exercise 1. Prove that prime elements are irreducible.

Exercise 2. Let p = 101. Write a CoCoA program which checks whether a given polynomial f ∈ ℤ/(p)[x] of degree deg(f) ≤ 3 is irreducible. Prove the correctness of your method.

Exercise 3. Let p be a prime number and π : ℤ[x] → ℤ/(p)[x] the canonical homomorphism.

a) Show that if f ∈ ℤ[x] is a monic polynomial and π(f) is irreducible then f is irreducible.

b) Prove that statement a) is, in general, false if f is not monic.

c) Give a counterexample to the converse of a).

Exercise 4. Find a factorial domain R ≠ ℤ which does not contain a field.

Exercise 5. Show that if R is a factorial domain and 𝔭 is minimal among the prime ideals different from (0), then 𝔭 is principal.

Exercise 6. Let R be an integral domain with the property that every non-zero non-unit has a factorization. Assume that, for all a, b ∈ R \ {0}, the ideal (a) ∩ (b) is principal.

a) Prove that, given non-associated irreducible elements a, b ∈ R \ {0}, we have (a) ∩ (b) = (ab). Hint: Let (a) ∩ (b) = (c), let ab = rc, and let c = sa. Show that s cannot be a unit. Then deduce that r has to be a unit. b) Use a) to prove that two factorizations of any element are the same

up to order and units.

c) Conclude that R is a factorial domain.

Exercise 7. Consider the ring R = ℤ[\sqrt{−5}]. Prove that the elements f_{1} = 2 + 2\sqrt{−5} and f_{2} = 6 do not have a greatest common divisor in the sense of Proposition 1.2.7.a. Hint: Show that both 2 and 1 + \sqrt{−5} are common divisors.

Exercise 8. Let R be a factorial domain and a, b ∈ R \ {0} two coprime elements. Prove that the polynomial ax+b is an irreducible element of R[x].

Exercise 9. Let K be a field, P = K[x_{1}, x_{2}, x_{3}, x_{4}], and 𝔭 be the principal ideal generated by f = x_{1}x_{4} − x_{2}x_{3} .

a) Show that the polynomial f is irreducible in P . Deduce that P/𝔭 is an integral domain.

b) Prove that the residue class of x_{1} modulo 𝔭 is irreducible in P/𝔭, but not prime. Use this to infer that P/𝔭 is not factorial.

Exercise 10. Let K be a field and K(x) the field of fractions of K[x]. We consider the ring R = K[x_{1}, x_{2}]/(x_{1}x_{2} − 1).

a) Show that R is isomorphic to a K -subalgebra of K(x) which contains K[x]. (Hint: Try to map x_{1} to x and x_{2} to \frac{1}{x}. To show that only multiples of x_{1}x_{2}−1 are in the kernel of this map, write polynomials in K[x_{1}, x_{2}] as ∑_{i>0} x_{1}^{i} ·f_{i}(x_{1}x_{2})+∑_{i>0} x_{2}^{i} ·g_{i}(x_{1}x_{2})+c where c ∈ K.)

b) Using a), we may assume K[x] ⊂ R ⊂ K(x). In this situation, show that x is a unit in R and every element g ∈ R can be written as g = x^{r} · f where r ∈ ℤ and f ∈ K[x].

c) Prove that R is a factorial domain. (Hint: Use the representation given in b) to show that every irreducible element is prime.)

Exercise 11. For a univariate polynomial f, we denote its derivative by f′. Let K be a field such that char(K) ≠ 2, 3.

a) Let f(x) = x(x − a)(x − b) and assume that 2 and a^{2} + b^{2} + (a − b)^{2} are squares in K. Then prove that f′(x) splits as the product of two linear factors.

b) If 3 is a square in K, observe that f = x^{3} − 3ax^{2} − 3b^{2}x + 9ab^{2} is a product of three linear factors.

c) Use a) and b) to prove that the following conditions are equivalent. 1) For all a, b ∈ K, there is an element c ∈ K such that a^{2}+b^{2} = c^{2} .

2) For every monic polynomial f ∈ K[x] of degree 3 which is a product of three linear factors, f′ is a product of two linear factors.

Tutorial 4: Euclidean Domains

In general, it is difficult to decide whether a given ring is factorial, and consequently there exists only a rather limited supply of examples of factorial domains. The purpose of this tutorial is to provide the reader with a tool for constructing or detecting a special kind of non-trivial factorial domains.

We say that (R, φ) (or simply R) is a Euclidean domain if R is a domain and φ is a function φ : R \ {0} → ℕ such that for all a, b ∈ R \ {0} the following properties hold.

1) If a | b then φ(a) ≤ φ(b).

2) There exist elements q, r ∈ R such that a = qb + r and either r = 0 or φ(r) < φ(b). First of all, prove that in a Euclidean domain R the following additional

rule holds.

3) Let a, b ∈ R \ {0}. If b = ac for some non-unit c ∈ R, then φ(a) < φ(b). Hint: Use 2) and write a = qb + r. Show that r ≠ 0, hence φ(r) < φ(b). Deduce (1 − qc)a = r, hence φ(a) ≤ φ(r). Some rings, which should be familiar to the reader, are in fact Euclidean

domains.

a) Show that the ring of integers ℤ, together with the absolute value function, is a Euclidean domain.

b) Check that every univariate polynomial ring K[x] over a field K, together with the degree function, is a Euclidean domain.

In the following, we let R be a Euclidean domain.

c) Show that if m = min{φ(a) | a ∈ R\{0}}, then {a ∈ R\{0} | φ(a) = m} is the set of units of R.

d) Use 1), and an argument similar to that given in Lemma 1.2.11, to prove that every non-unit in R \ {0} has a factorization.

e) Use 2) to show that in R there is a notion of gcd(a, b) for a, b ∈ R \ {0} in the sense of Proposition 1.2.7.a, and that gcd(a, b) can be expressed as ra + sb with r, s ∈ R.

f) Use e) to prove that in R every irreducible element is prime. Conclude that R is factorial. Hint: Let p be irreducible and ab = cp. If p does not divide a, then gcd(a, p) = 1. Hence 1 = ra + sp, and therefore b = · · ·.

g) Consider the subring ℤ[i] = {a + bi | a, b ∈ ℤ} of ℂ. It is called the ring of Gaußian numbers.

1) Let φ : ℤ[i] \ {0} ⟶ ℕ be defined by φ(a + bi) = a^{2} + b^{2} . Show that φ makes ℤ[i] into a Euclidean domain. Hint: Let z_{1} = a + bi, z_{2} = c + di and z = \frac{z_{1}}{z_{2}} = \frac{(a+bi)(c−di)}{c^{2}+d^{2}} ∈ ℚ[i]. Choose for q ∈ ℤ[i] a “good” approximation of z and write z_{1} = qz_{2} + r.

2) Find the set of units of ℤ[i].

3) Let p ∈ ℕ be a prime number. Show that p is reducible in ℤ[i] if and only if there exist a, b ∈ ℕ such that p = a^{2} + b^{2} . Hint: Prove that the map φ is compatible with multiplication.

4) Show that if z ∈ ℤ[i] is such that φ(z) is a prime number in ℤ, then z is prime in ℤ[i].

5) Representing elements of ℤ[i] as pairs of integers, implement two CoCoA functions GaussGCD(…) and GaussLCM(…) which compute the greatest common divisor and least common multiple of two Gaußian integers, respectively.

6) Using CoCoA, program a factorization algorithm GaussFactor(…) for elements z ∈ ℤ[i]. Hint: Proceed as for integers, searching for divisors in the set of all elements a + bi such that a^{2} + b^{2} divides φ(z).

Tutorial 5: Squarefree Parts of Polynomials

In this tutorial we shall explore how one can effectively compute the squarefree part of a univariate polynomial over certain fields. It will turn out that this seemingly innocent problem is in fact intrinsically related to the structure of the base field K.

a) Let K be a field of characteristic p > 0, and let φ : K → K be the map defined by φ(a) = a^{p}. The map φ is called the Frobenius map.

1) Show that the map φ is a ring homomorphism.

2) Show that φ is bijective if K is finite.

3) Deduce that if K is finite then every element has a unique p^{th} root. If a field K has characteristic 0 or has characteristic p > 0 and, in

addition, has the property that every element has a p^{th} root, then K is called a perfect field. In the sequel, we let K be a perfect field and f ∈ K[x] a non-zero polynomial. We use the convention gcd(f, 0) = f and denote the derivative of f by f′.

b) Let char(K) = p > 0. Show that f′ = 0 holds if and only if f is of the form f = g^{p} for some g ∈ K[x].

c) Suppose that K = 𝔽_{q}, where q = p^{e} and e > 0, is a finite field of characteristic p > 0 (see Tutorial 3), and let f ∈ K[x] be a polynomial such that f′ = 0. Explain how one can compute a polynomial g ∈ K[x] such that g^{p} = f. Hint: Show that every term in the support of f is of the form x^{αp} and prove (c^{p^{e−1}})^{p} = c for all c ∈ K.

d) Write a CoCoA function PRoot(…) which takes a polynomial f ∈ 𝔽_{p}[x] such that f′ = 0 and computes a polynomial g ∈ 𝔽_{p}[x] such that f = g^{p}.

e) Show that if f is irreducible, then we have gcd(f, f′) = 1.

Hint: Distinguish the cases char(K) = 0 and char(K) = p > 0. f) Let g ∈ K[x] be a polynomial such that gcd(f, g) = 1. Prove the formula

gcd(fg, (fg)′) = gcd(f, f′) gcd(g, g′).

g) Let char(K) = 0 and f = c ∏_{i=1}^{s} p_{i}^{α_{i}} be the factorization of f into distinct irreducible factors, where c ∈ K \ {0}. Show that gcd(f, f′) = ∏_{i=1}^{s} p_{i}^{α_{i}−1} and deduce that sqfree(f) can be computed by using the formula

sqfree(f) = f/ gcd(f, f′)

h) Find an example which shows that g) is false if char(K) = p > 0.

i) Now let K be a finite field of characteristic p > 0. In Proposition 3.7.12 we shall prove that sqfree(f) can be computed using the following algorithm.

1) Compute s_{1} = gcd(f, f′). If s_{1} = 1, then return f.

2) Check whether we have s′_{1} = 0. In this case, use b) to conclude that s_{1} = g^{p} for some polynomial g ∈ K[x]. Compute g using PRoot(…). Then replace f by \frac{fg}{s_{1}} = \frac{f}{g^{p−1}} , and continue with step 1).

3) Compute s_{i+1} = gcd(s_{i}, s′_{i}) for i = 1, 2, … until s′_{i+1} = 0, i.e. until s_{i+1} is a p^{th} power s_{i+1} = g^{p} for some g ∈ K[x]. Then calculate g again, replace f by \frac{fg}{s_{1}} , and continue with step 1).

Write a CoCoA function SqFree(…) which checks whether the base field is ℚ or 𝔽_{p} and computes the squarefree part of a given univariate polynomial.

Tutorial 6: Berlekamp’s Algorithm

In the case of a finite field K, we shall explore a concrete algorithm which factors polynomials in K[x]. So, let p be a prime number, let e be a positive integer, let q = p^{e}, and let K be the field with q elements (see Tutorial 3). (If you are unfamiliar with finite fields, it is enough to concentrate on the case q = p, K = ℤ/(p).)

Our goal is to compute the factorization of a non-constant monic polynomial f ∈ K[x] of degree d = deg(f).

a) Prove that the ring R = K[x]/(f) is a d-dimensional K -vector space with basis {1, x̄, x̄^{2}, …, x̄^{d−1}}, where x̄ is the residue class of x in R. In what follows, let Q = (q_{ij}) be the d × d-matrix over K whose i^{th}

row consists of the coordinates of x̄^{q(i−1)} in the basis {1, x̄, …, x̄^{d−1}} of R. Furthermore, we let ḡ = γ_{0} + ⋯ + γ_{d−1}x̄^{d−1} with γ_{0}, …, γ_{d−1} ∈ K be the representation of the residue class of a polynomial g ∈ K[x] in this basis.

b) Show that ḡ^{q} = (γ_{0}, …, γ_{d−1})·Q·(1, x̄, …, x̄^{d−1})^{tr} . Conclude that there is a 1-1 correspondence between elements ḡ ∈ R such that ḡ^{q} − ḡ = 0 and vectors (γ_{0}, …, γ_{d−1}) ∈ K^{d} such that (γ_{0}, …, γ_{d−1}) · (Q − I_{d}) = 0, where I_{d} denotes the d × d identity matrix. c) For any polynomial g ∈ K[x] satisfying ḡ^{q} − ḡ = 0 in R, prove that we

have f = ∏_{κ∈K} gcd(f, g − κ). (Hint: Find the factorization of x^{q} − x and substitute g for x.)

d) Let f = ∏_{i=1}^{r} p_{i}^{α_{i}} be the factorization of f, where α_{i} > 0 for i = 1, …, r and p_{1}, …, p_{r} are the different irreducible monic factors of f. Prove the following special case of the Chinese Remainder Theorem. The canonical map

ε : R ⟶ K[x]/(p_{1}^{α_{1}}) × ⋯ × K[x]/(p_{r}^{α_{r}})

is an isomorphism of K[x]-algebras. (Hint: To show surjectivity, let g_{1}, …, g_{r} ∈ K[x], use h_{i} = ∏_{j≠i} p_{j}^{α_{j}}, get an equation ∑_{i=1}^{r} a_{i}h_{i} = 1, and consider ε(∑_{i=1}^{r} g_{i}a_{i}h_{i}).) Deduce that ε induces an isomorphism of K -vector spaces

φ : {ḡ ∈ R | ḡ^{q} − ḡ = 0} ⟶ K^{r}

e) Conclude from d) that the number of distinct irreducible factors of f is given by r = dim_{K}(ker(Q − I_{d})). Write a CoCoA function IsIrred(…) which checks whether a given polynomial f ∈ K[x] is irreducible. Hint: You may use the CoCoA function Syz(…) to compute the kernel of a linear map.

f) Consider the following sequence of instructions.

1) Compute the matrix Q and the number r defined above. Let {(v_{i1}, …, v_{id}) | 1 ≤ i ≤ r} be a K -basis of ker(Q − I_{d}) and g_{i} = v_{i1} + v_{i2}x + ⋯ + v_{id}x^{d−1} ∈ K[x] for 1 ≤ i ≤ r. W.l.o.g. we can assume that g_{r} = 1 and deg(g_{i}) > 0 for 1 ≤ i < r.

2) For all κ ∈ K, compute gcd(f, g_{1} − κ) and obtain a representation f = ∏_{κ∈K} gcd(f, g_{1} − κ). If this representation contains r different non-constant factors, return it as the result.

3) For i = 1, 2, …, let f = f_{i 1} ⋯ f_{i μ_{i}} be the representation of f computed so far. For every κ ∈ K and every j ∈ {1, …, μ_{i}}, compute gcd(f_{i j}, g_{i+1} − κ). Then check, if the representation

f = ∏_{j=1}^{μ_{i}} ∏_{κ∈K} gcd(f_{i j}, g_{i+1} − κ)

consists of r different non-constant factors. If not, increase i by one and repeat step 3), until it does. Then return this representation as the result.

Show that this is an algorithm which stops for some i ≤ r − 1 and that it returns a representation of f as the product of powers of distinct irreducible monic polynomials. It is called Berlekamp’s Algorithm. If we combine it with the algorithm for computing squarefree parts of polynomials in K[x] described in Tutorial 5, we have a complete factorization algorithm for univariate polynomials over finite fields.

Hint: To show finiteness, use that the determinant of the matrix Φ of the map φ above is non-zero, and that the number of non-constant different factors in f_{i1} ⋯ f_{iμ_{i}} is equal to the number of different entries in the i^{th} column of Φ.

g) Implement Berlekamp’s Algorithm for K = ℤ/(p). Then apply your function Berlekamp(…) and check it against the built-in routines of CoCoA in the following cases.

1) f_{1} = x^{100} − x^{200} ∈ ℤ/(5)[x]

2) f_{2} = 1 + x + x^{2} + x^{6} + x^{7} + x^{8} + x^{12} ∈ ℤ/(2)[x]

3) f_{3} = 1 − x^{100} ∈ ℤ/(7)[x]

4) f_{4} = 8 + 2x + 8x^{2} + 10x^{3} + 10x^{4} + x^{6} + x^{8} ∈ ℤ/(13)[x]

5) f_{5} = 2 + x + x^{2} + x^{3} + x^{4} + x^{5} ∈ ℤ/(31991)[x]

1.3 Monomial Ideals and Monomial Modules

Mathematics is a game

played according to certain simple rules

with meaningless marks on paper. (David Hilbert)

Let us start with a little game. Consider the monoid 𝕋^{1} = {1, x, x^{2}, x^{3}, …}. Pick one element in 𝕋^{1} , call it s_{1} , and delete it from 𝕋^{1} . Then pick another element in 𝕋^{1}\{s_{1}}, call it s_{2} , and delete it from 𝕋^{1}\{s_{1}}. If s_{2} is not divisible by s_{1} you say that s_{2} is a winner. Keep going on and construct a sequence {s_{n}} of distinct elements of 𝕋^{1} and declare that s_{n} is a winner if it is not divisible by any of the preceding ones. It is immediately clear that, after the first choice has been made, only a finite number of potential winners are left. Therefore in your sequence from a certain point on all the elements are losers, i.e. multiples of some preceding element. In this case the explanation is easy, but a more important question arises: is a similar conclusion valid if you start with 𝕋^{n} instead?

One of the main purposes of this section is to answer that question, and the answer is Dickson’s Lemma. Put in another way, we show that monomial ideals are finitely generated. The importance of this result will become more evident later, but of course it is already clear that statements about “finiteness” are crucial for actual computations. Towards the end of this section we also prove a powerful structure theorem for monomial modules.

Now we begin with the definition of two algebraic structures which help us translate our game into a solid mathematical result. We recall that a monoid is a set together with an associative operation on it such that there exists an identity. Since in all the cases considered in this book the operation will be commutative, we shall from now on use the term “monoid” to denote a commutative monoid.

Definition 1.3.1. Let (Γ, ∘) be a monoid.

a) A non-empty subset Δ ⊆ Γ is called a monoideal (pronounced “monoideal”) in Γ (or a monoid ideal in Γ) if we have Δ ∘ Γ ⊆ Δ.

b) A subset B of a monoideal Δ in Γ is called a system of generators of Δ (or Δ is said to be generated by B) if Δ is the smallest monoideal in Γ containing B. In this case we have Δ = {β ∘ γ | β ∈ B, γ ∈ Γ }. If B = {β_{1}, β_{2}, …}, we will also use the notation Δ = (β_{1}, β_{2}, …).

c) A set Σ together with an operation ∗ : Γ ×Σ → Σ given by (γ, s) ↦ γ∗s is called a Γ -monomodule (or a monoid module over Γ) if for all s ∈ Σ and all γ_{1}, γ_{2} ∈ Γ we have

1) 1_{Γ} ∗ s = s,

2) (γ_{1} ∘ γ_{2}) ∗ s = γ_{1} ∗ (γ_{2} ∗ s).

d) A non-empty subset Σ′ ⊆ Σ is called a Γ -submonomodule of Σ if Γ ∗ Σ′ ⊆ Σ′. e) A subset B of a Γ -monomodule Σ is called a system of generators

of Σ if Σ = {γ ∗ s | γ ∈ Γ, s ∈ B}.

Later the symbols ∘ and ∗ will sometimes be omitted. Obviously, a monoideal in Γ is also a Γ -monomodule. In fact, it is a Γ -submonomodule of the Γ -monomodule Γ, just like for regular ideals and modules. The most important example of a monomodule for our purposes is the set of terms 𝕋^{n}⟨e_{1}, …, e_{r}⟩ of a free module R[x_{1}, …, x_{n}]^{r} over some polynomial ring. It is a 𝕋^{n} -monomodule generated by {e_{1}, …, e_{r}}. Some monomodules require infinite systems of generators, as our next example shows.

Example 1.3.2. The set ℚ_{≥0} of non-negative rational numbers with the usual sum is a monoid. Then ℚ_{>0} , the set of positive rational numbers, is a monoideal in ℚ_{≥0} which is generated by \{\frac{1}{n} | n ≥ 1\}. It is easy to see that this monoideal is not finitely generated.

Now let 𝕀 = ℝ\ℚ be the set of irrational numbers. Adding an element of ℚ_{≥0} to an element of 𝕀 yields an element of 𝕀. Since conditions 1) and 2) of Definition 1.3.1.c are satisfied, we have here an example of a ℚ_{≥0} -mono-module. Again one can show that this monomodule is not finitely generated.

Definition 1.3.3. Let (Γ, ∘) be a monoid and (Σ, ∗) a Γ -monomodule.

a) We say that the cancellation law holds in Γ, if γ_{1} ∘γ_{3} = γ_{2} ∘γ_{3} implies γ_{1} = γ_{2} for all γ_{1}, γ_{2}, γ_{3} ∈ Γ.

b) We say that the left-cancellation law holds in Σ, if γ ∗ s_{1} = γ ∗ s_{2} implies s_{1} = s_{2} for all γ ∈ Γ, s_{1}, s_{2} ∈ Σ.

c) We say that the right-cancellation law holds in Σ, if γ_{1} ∗ s = γ_{2} ∗ s implies γ_{1} = γ_{2} for all γ_{1}, γ_{2} ∈ Γ, s ∈ Σ.

If we consider a monoid Γ as a Γ -monomodule in the obvious way, conditions b) and c) both agree with a) so that there is only one cancellation law in Γ. In Example 1.3.2, the cancellation law holds in ℚ_{≥0} , and both the leftcancellation law and the right-cancellation law hold in the monomodule 𝕀. Furthermore, for every n ≥ 1, the cancellation law holds in the monoid of terms 𝕋^{n} introduced in Definition 1.1.10, and, for every r ≥ 1, both the leftcancellation law and the right-cancellation law hold in the 𝕋^{n} -monomodule 𝕋^{n}⟨e_{1}, …, e_{r}⟩. The following concept provides an important finiteness condition for monoids.

Proposition 1.3.4. For a monoid (Γ, ∘) the following conditions are equivalent.

a) Every monoideal in Γ is finitely generated.

b) Every ascending chain Δ_{1} ⊆ Δ_{2} ⊆ ⋯ of monoideals in Γ is eventually stationary.

c) Every non-empty set of monoideals in Γ has a maximal element with respect to inclusion. If these conditions are satisfied, the monoid Γ is called Noetherian.

Proof. First we show a) ⇒ b). Suppose we have a chain Δ_{1} ⊆ Δ_{2} ⊆ ⋯ of monoideals in Γ and a sequence n_{1} < n_{2} < ⋯ such that there exist elements γ_{i} ∈ Δ_{n_{i+1}} \Δ_{n_{i}} for all i ≥ 1. Then we claim that the monoideal generated by {γ_{1}, γ_{2}, …} is not finitely generated. It is contained in the union ∪_{i≥1}Δ_{i}, but not in one of the monoideals Δ_{i}. Now assume that it is generated by a finite set. Then such a finite set has to be contained in some Δ_{i}, a contradiction.

Now we prove b) ⇒ c). Let S be a non-empty set of monoideals in Γ, and let Δ_{1} ∈ S. If Δ_{1} is not maximal, there exists a monoideal Δ_{2} ∈ S such that Δ_{1} ⊂ Δ_{2} . Continuing in this way, we obtain a chain Δ_{1} ⊂ Δ_{2} ⊂ ⋯ which has to be finite by b). Then the last element of the chain is a maximal element of S.

To show the remaining implication c) ⇒ a), we let Δ ⊆ Γ be a monoideal. The set of all monoideals in Γ which are generated by finite subsets of Δ contains a maximal element. By construction, this element has to be Δ itself.

□

Proposition 1.3.5. For n ≥ 1, the monoid (ℕ^{n}, +) is Noetherian.

Proof. We use induction on n. When n = 1, every monoideal is obviously of the form (a) with a fixed a ∈ ℕ. For n > 1, we let Δ_{1} ⊆ Δ_{2} ⊆ ⋯ be an ascending chain of monoideals in ℕ^{n}. Suppose there are indices n_{1} < n_{2} < ⋯ and elements w_{i} ∈ Δ_{n_{i+1}} \ Δ_{n_{i}} for i ≥ 1. Let v_{1} = w_{m_{1}} ∈ {w_{1}, w_{2}, …} be a vector whose first component is minimal. Then we let v_{2} = w_{m_{2}} ∈ {w_{m_{1}+1}, w_{m_{1}+2}, …} be a vector whose first component is minimal again, etc. In this way we construct a sequence v_{1}, v_{2}, … of vectors of ℕ^{n} whose first components form a non-decreasing sequence.

For all i ≥ 1, we let v′_{i} now be the vector in ℕ^{n−1} which consists of the last n − 1 components of v_{i}. By the induction hypothesis, the chain of monoideals (v′_{1}) ⊆ (v′_{1}, v′_{2}) ⊆ ⋯ in ℕ^{n−1} becomes eventually stationary. Then also the chain (v_{1}) ⊆ (v_{1}, v_{2}) ⊆ ⋯ of monoideals in ℕ^{n} becomes eventually stationary, since the first components of v_{1}, v_{2}, … form an increasing sequence. We arrive at a contradiction to the construction of w_{1}, w_{2}, …, since we had v_{i} = w_{m_{i}} ∉ (w_{1}, …, w_{m_{i−1}}) ⊇ (v_{1}, …, v_{i−1}) for all i ≥ 2. □

In the remaining part of this section we shall apply the above theory to the monoid of terms in a polynomial ring. The translation of the previous proposition provides us with an important finiteness condition for ideals in polynomial rings.

Corollary 1.3.6. (Dickson’s Lemma) Let n ≥ 1, and let t_{1}, t_{2}, … be a sequence of terms in 𝕋^{n}. Then there exists a number N > 0 such that for every i > N the term t_{i} is a multiple of one of the terms t_{1}, …, t_{N}, i.e. the monoideal (t_{1}, t_{2}, …) ⊆ 𝕋^{n} is generated by {t_{1}, …, t_{N}}.

In particular, for every ring R, the ideal (t_{1}, t_{2}, …) ⊆ R[x_{1}, …, x_{n}] is finitely generated.

Proof. The map log : 𝕋^{n} → ℕ^{n} given by x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} ↦ (α_{1}, …, α_{n}) is clearly an isomorphism of monoids. The monoideal (log(t_{1}), log(t_{2}), …) ⊆ ℕ^{n} is finitely generated by the previous proposition. Thus there exists a number N > 0 such that this monoideal is generated by {log(t_{1}), …, log(t_{N})}. Consequently, the monoideal (t_{1}, t_{2}, …) ⊆ 𝕋^{n} is generated by {t_{1}, …, t_{N}}. □

As we shall see, ideals and modules generated by terms have many special properties. We begin our studies by giving them a special name. Let R be a ring, let n ≥ 1, let P = R[x_{1}, …, x_{n}] be a polynomial ring, and let r ≥ 1.

Definition 1.3.7. A P -submodule M ⊆ P^{r} is called a monomial module, if it has a system of generators consisting of elements of 𝕋^{n}⟨e_{1}, …, e_{r}⟩. A monomial submodule of P is also called a monomial ideal of P.

Monomial ideals can be readily visualized, especially when there are just two or three indeterminates.

Remark 1.3.8. For monomial ideals I ⊆ R[x_{1}, x_{2}], we can illustrate the set of terms in I as follows. A term x_{1}^{i}x_{2}^{j} ∈ 𝕋^{2} is represented by the point (i, j) ∈ ℕ^{2} . Then, for each term x_{1}^{i}x_{2}^{j} ∈ I, the quadrant {x_{1}^{k}x_{2}^{l} | k ≥ i, l ≥ j} is contained in I. For instance, when I = (x_{1}^{5}, x_{1}^{3}x_{2}, x_{1}x_{2}^{2}, x_{2}^{4}) we obtain the following picture.

._{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.} _{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}  _{x_{1}}^{x_{2}} • •  •  •_{1}^{x_{2}^{4}}  ^{x_{1}x_{2}^{2}}  ^{x_{1}^{3}x_{2}}  _{x_{1}^{5}}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}

Dickson’s Lemma can be generalized to monomial modules as follows.

Theorem 1.3.9. (Structure Theorem for Monomial Modules) Let M ⊆ P^{r} be a monomial module.

a) The module M is finitely generated, i.e. there are finitely many terms t_{1}, …, t_{s} ∈ 𝕋^{n} and numbers γ_{1}, …, γ_{s} ∈ {1, …, r} such that we have M = ⟨t_{1}e_{γ_{1}}, …, t_{s}e_{γ_{s}}⟩.

b) There are monomial ideals I_{1}, …, I_{r} ⊆ P such that M is of the form M ≅ ⊕_{i=1}^{r}I_{i}e_{i}.

Proof. Let B ⊆ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ be a system of generators of M. For every number i ∈ {1, …, r} we define the set B_{i} = {t ∈ 𝕋^{n} | te_{i} ∈ B} ⊆ 𝕋^{n}. By Dickson’s Lemma, the monomial ideals I_{i} = (B_{i}) have finite systems of generators G_{i} ⊆ B_{i}. Obviously the P -module M is then generated by G_{1}e_{1} ∪ ⋯ ∪ G_{r}e_{r} ⊆ 𝕋^{n}⟨e_{1}, …, e_{r}⟩. This proves a) and the claim M = ∑_{i=1}^{r} I_{i}e_{i} in b). The fact that this sum is direct follows from M ⊆ ⊕_{i=1}^{r}P e_{i}.

□

The first part of this theorem says in particular that the analogue of Proposition 1.3.4.a holds for monomial modules. Let us note that this implies that also the analogue of Proposition 1.3.4.b is true.

Corollary 1.3.10. Every ascending chain of monomial submodules of P^{r} is eventually stationary.

Proof. Suppose there exists a strictly ascending chain M_{1} ⊂ M_{2} ⊂ ⋯ of monomial submodules of P^{r}. Since each module is generated by terms, we can then find a term t_{i} ∈ M_{i} \ M_{i−1} for every i ≥ 2. For all i ≥ 1 we have ⟨t_{1}, …, t_{i}⟩ ⊆ M_{i}, and therefore t_{i+1} ∉ ⟨t_{1}, …, t_{i}⟩. Thus the monomial submodule ⟨t_{1}, t_{2}, …⟩ of P^{r} is not finitely generated, in contradiction to the theorem. □

Finally, we address the question of uniqueness for systems of generators of monomial modules.

Proposition 1.3.11. Let M ⊆ P^{r} be a monomial submodule.

a) For every system of generators G = {t_{1}, …, t_{s}} of M consisting of terms, and for every term t ∈ M, there exists a term t_{i} ∈ G such that t is a multiple of t_{i}.

b) In the set of all systems of generators of M which consist entirely of terms there is a unique minimal element with respect to inclusion. We call it the minimal monomial system of generators of M.

Proof. The first claim follows from the fact that if we write t = ∑_{i=1}^{s} f_{i}t_{i} with polynomials f_{1}, …, f_{s} ∈ P, then the term t must show up in the support of one of the elements f_{1}t_{1}, …, f_{s}t_{s}.

To show b), we prove existence first. By Theorem 1.3.9.a, there exists a finite system of generators of M consisting of terms. If we delete in this set all terms which are proper multiples of another element of that set, and if we also remove all repetitions of an element, we obtain a system of generators of M which cannot be shortened anymore.

To prove uniqueness, we suppose that there are two different minimal monomial systems of generators G_{1} and G_{2} of M. By symmetry, we may assume that there is a term t ∈ G_{1} \ G_{2} . From a) we conclude that t is a multiple of an element t′ ∈ G_{2} . Using a) again, we see that t′, and therefore t, is a multiple of one of the elements of G_{1} . Since G_{1} is minimal, that element is necessarily t itself, i.e. t and t′ are multiples of each other. Thus t = t′ ∈ G_{2} , a contradiction. □

Exercise 1. Let Γ be a commutative group. Show that in it there is only one monoideal, namely Γ itself.

Exercise 2. Equip the set Γ = {0, ∞} with the “natural” addition and show that (Γ, +) is a commutative monoid in which the cancellation law does not hold.

Exercise 3. We consider the additive monoid ℚ_{≥0} (see Example 1.3.2). We let a be a non-negative real number and ℚ_{≥a} = {b ∈ ℚ_{≥0} | b ≥ a}.

a) Prove that if a ∈ ℚ, then ℚ_{≥a} is a principal monoideal, i.e. a monoideal generated by a single element.

b) Prove that if a ∉ ℚ, then ℚ_{≥a} is a monoideal which is not finitely generated.

c) If a ∉ ℚ, find an infinite increasing sequence of monoideals in ℚ_{>0} whose union is ℚ_{≥a}.

d) Prove that the monomodule 𝕀 = ℝ \ ℚ is not finitely generated.

Exercise 4. Let us use the notation of Example 1.3.2 again.

a) Show that ℚ_{>0} with the usual multiplication is a monoid.

b) Show that this monoid has no non-trivial monoideal.

c) Show that 𝕀 = ℝ \ ℚ is a ℚ_{>0} -monomodule.

Exercise 5. Let (Γ, ∘) be a Noetherian monoid in which the cancellation law holds. Assuming that the only unit is 1_{Γ} , prove that every monoideal Δ has a unique minimal (i.e. shortest) set of generators.

Exercise 6. Let (Γ, ∘) be a monoid, Δ a finitely generated monoideal in Γ , and let B be a system of generators of Δ. Prove that Δ can be generated by a finite subset of B.

Exercise 7. Let n ≥ 1 and r ≥ 1. Show that the set of terms 𝕋^{n}⟨e_{1}, …, e_{r}⟩ is a monomodule over 𝕋^{n}.

Exercise 8. Let B ⊂ 𝕋^{n} be such that no element in B is divisible by another element in B. Prove that B is finite.

Exercise 9. Let (Γ, ∘) be a monoid, and let Σ be a Γ -monomodule. We say that Σ is a Noetherian Γ -monomodule if every ascending chain of Γ -submonomodules Σ_{1} ⊆ Σ_{2} ⊆ ⋯ of Σ is eventually stationary.

a) For submonomodules of Σ, formulate and prove an analogue of Proposition 1.3.4.

b) Let Γ be a Noetherian monoid, and let Σ be a finitely generated Γ -monomodule. Then show that Σ is Noetherian.

c) Conclude that the 𝕋^{n} -monomodule 𝕋^{n}⟨e_{1}, …, e_{r}⟩ is Noetherian.

Tutorial 7: Cogenerators

Let (Γ, ∘) be a monoid, let Δ be a monoideal in Γ, let Λ = Γ \Δ be the complement of Δ in Γ, and let C ⊆ Λ. We say that C cogenerates Δ if Λ = {γ ∈ Γ | γ ∘ γ′ ∈ C for some γ′ ∈ Γ }.

._{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.} _{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}  _{x_{1}}^{x_{2}} •  •  •_{1}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}

a) Show that the complement Λ of a monoideal in a monoid is characterized by the following property: if γ ∈ Λ and γ′ | γ, then γ′ ∈ Λ.

b) Let Δ(I) be the monoideal in 𝕋^{2} consisting of the terms in the ideal I = (x_{1}^{5}, x_{1}^{3}x_{2}, x_{1}x_{2}^{2}, x_{2}^{4}) introduced in Remark 1.3.8. Show that Δ(I) is finitely cogenerated and find a minimal set of cogenerators.

c) Now let J = (x_{1}^{5}, x_{1}^{3}x_{2}, x_{1}x_{2}^{2}), and let Δ(J) be the associated monoideal in 𝕋^{2} . Find a set of cogenerators and show that J is not finitely cogenerated.

d) Characterize the finitely cogenerated monoideals in 𝕋^{2} . Show that they have a unique minimal set of cogenerators.

e) Let m(Δ) be the cardinality of a minimal set of generators and c(Δ) the cardinality of a minimal set of cogenerators of a finitely cogenerated monoideal Δ ⊆ 𝕋^{2} . Prove that c(Δ) = m(Δ) − 1.

f) Characterize monoideals in 𝕋^{2} cogenerated by a single element. Given such a monoideal Δ ⊆ 𝕋^{2} and its cogenerator λ ∈ Λ, prove that we have Δ = {t ∈ 𝕋^{2} | x_{1} · t ∈ Δ, x_{2} · t ∈ Δ} \ {λ}.

g) Write a CoCoA function MinCogens(…) which, given a finite list of terms, checks if the monoideal generated by them is finitely cogenerated and in that case computes the minimal set of cogenerators.

Tutorial 8: Basic Operations with Monomial Ideals and Modules

Let K be a field, let n ≥ 1, let P = K[x_{1}, …, x_{n}], and let r ≥ 1.

a) Show that a P -submodule M ⊆ P^{r} is a monomial module if and only if for every m ∈ M and every t ∈ Supp(m) we have t ∈ M.

b) Write a CoCoA function Is Monomial(…) which, for a list of vectors generating a P -submodule M ⊆ P^{r}, checks if M is monomial and which returns TRUE or FALSE. (Hint: You may use the CoCoA operator IsIn.)

c) Implement a CoCoA function MonComps(…) which, for a list of terms generating a monomial P -submodule M ⊆ P^{r}, computes the list of monomial ideals I_{1}, …, I_{r} such that M = I_{1}e_{1} ⊕ ⋯ ⊕ I_{r}e_{r} as in Proposition 1.3.9.b.

d) Write a CoCoA program MinMonomials(…) which takes a list of terms generating a monomial P -submodule of P^{r} and computes the minimal monomial system of generators of that module. (Hint: Do the case of a monomial ideal first. Then apply the preceding program.) In the sequel, we let I ⊆ P be a monomial ideal and M ⊆ P^{r} as well

as N ⊆ P^{r} monomial submodules, all given by lists of terms which generate them.

e) Prove that M + N and I · M are monomial submodules of P^{r}. Write CoCoA functions MonSum(…) and MonProd(…) which compute those modules.

f) Show that M ∩ N is a monomial submodule of P^{r} by giving an explicit monomial system of generators. Then implement a CoCoA function MonIntersection(…) which computes this intersection. (Hint: Do the case r = 1 first. Then try to generalize your result.)

g) Prove that M : N = {f ∈ P | f · N ⊆ M} is a monomial ideal by giving an explicit monomial system of generators. Write a CoCoA function MonColon(…) which computes this colon ideal.

h) Let 1 ≤ m < n. Show that M ∩ K[x_{1}, …, x_{m}]^{r} is a monomial K[x_{1}, …, x_{m}]-submodule of K[x_{1}, …, x_{m}]^{r} by exhibiting an explicit monomial system of generators. Write a CoCoA function MonElim(…) which computes this elimination module.

i) Show that \sqrt{I} = \{f ∈ P | f^{i} ∈ I for some i ∈ ℕ\} is the monomial ideal generated by the squarefree parts of the generators of I. Write a CoCoA function MonRadical(…) which computes this radical ideal. Hint: The hint given here anticipates some themes explained later, starting with the next section. Given two terms t_{1}, t_{2} , we let t_{1} > t_{2} if the first non-zero component of log(t_{1}) − log(t_{2}) is positive. Show that, for f ∈ P \ {0} and i ∈ ℕ, the largest term in Supp(f^{i}) is the i^{th} power of the largest term in Supp(f). Now use a) and induction on the size of Supp(f) to prove that f^{i} ∈ I implies sqfree(t) ∈ \sqrt{I} for all t ∈ Supp(f).

1.4 Term Orderings

Dura Lex, sed Lex. (Ancient Latin Proverb)

Let us for a moment go back to Section 1.1 where we discussed the notion of polynomial rings in one and several indeterminates. A univariate polynomial with coefficients in a ring R is an expression of the type f(x) = ∑ r_{i}x^{i}. One question is: in how many different ways can we write f(x)? We might agree that the coefficients should be written before the corresponding power product and also decide to be “nice” and avoid the + sign before the first coefficient, but still we have to face the commutative property of the sum, which implies that for instance 1 + 2x − 3x^{2} can also be written as 1 − 3x^{2} + 2x. This may not be a relevant question for “pure” mathematicians, but it is fundamental if you wish to implement polynomials and use them in a computer program.

Clearly, what really matters is the order in which the terms 1, x, x^{2} , i.e. the elements in Supp(f), are written. Using the recursive definition of multivariate polynomials, we see that the way of writing them depends on how we write the univariate ones. And to do it, we see the necessity of knowing how to order 𝕋^{1} . Look again at f(x) = 1 + 2x − 3x^{2} , whose support is {1, x, x^{2}}. There are six ways of ordering three elements, which then yield six representations of f, namely 1 + 2x − 3x^{2} , 1 − 3x^{2} + 2x, 2x + 1 − 3x^{2} , 2x − 3x^{2} + 1, −3x^{2} + 1 + 2x, and −3x^{2} + 2x + 1. However, we believe that you are going to “keep” only 1 + 2x − 3x^{2} and −3x^{2} + 2x + 1.

Apart from aesthetic reasons, there is a technical one which validates this choice. Namely, suppose that you choose the rule “order by increasing degree”, which yields the representation 1+2x−3x^{2} , and suppose you want to multiply f(x) by x^{3} , say. After termwise multiplication, the rule continues to hold and you do not have to reorder the result. This leads to an extra property that your ordering of terms should have, the property of being compatible with multiplication. Put in a more technical setting, you should require that the total ordering on 𝕋^{1} makes it into an ordered monoid. Then you see that the specification 1 < x implies x < x^{2} < x^{3} and so on, and finally you see that only two possible orderings are left, the one described by 1 < x and the one described by x < 1. This is the end of the story for univariate polynomials and also for multivariate ones, if a recursive representation is used.

But we have already seen that other properties of polynomials allow us to get rid of the parentheses and express them as sums of coefficients times elements in 𝕋^{n}. So the question now is how to order 𝕋^{n}. For the same reasons as before we need compatibility with its monoid structure. Let f(x_{1}, x_{2}, x_{3}) = x_{1}x_{3} + x_{2}^{2} ; should we write it as x_{1}x_{3} + x_{2}^{2} or rather as x_{2}^{2} + x_{1}x_{3} ? There is no obvious answer to this question, and the purpose of this section is to shed some light on it.

In particular, we shall study total orderings on 𝕋^{n} and on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. If they have a certain additional property, they are called term orderings. This “fundamental property of module term orderings” is the key to showing finiteness for most algorithms we shall encounter later.

An attempt to classify all possible term orderings on 𝕋^{n}, at least in some easy cases, is made in Tutorial 10. Although we avoid treating the general classification of term orderings, we do show that some orderings can be defined by matrices via scalar products (see Proposition 1.4.12), and that all the most important monoid orderings are of that type.

In the following, let (Γ, ∘) be a monoid. Recall that for us this always means that Γ is commutative.

Definition 1.4.1. A relation σ on Γ is a subset of Γ ×Γ. If a pair (γ_{1}, γ_{2}) is in that subset, we shall write γ_{1} ≥_{σ} γ_{2} . A relation σ on Γ is called complete if any two elements γ_{1}, γ_{2} ∈ Γ are comparable, i.e. if we have γ_{1} ≥_{σ} γ_{2} or γ_{2} ≥_{σ} γ_{1} .

A complete relation σ on Γ is called a monoid ordering if the following conditions are satisfied for all γ_{1}, γ_{2}, γ_{3} ∈ Γ.

a) γ_{1} ≥_{σ} γ_{1} (reflexivity)

b) γ_{1} ≥_{σ} γ_{2} and γ_{2} ≥_{σ} γ_{1} imply γ_{1} = γ_{2} (antisymmetry)

c) γ_{1} ≥_{σ} γ_{2} and γ_{2} ≥_{σ} γ_{3} imply γ_{1} ≥_{σ} γ_{3} (transitivity)

d) γ_{1} ≥_{σ} γ_{2} implies γ_{1} ∘ γ_{3} ≥_{σ} γ_{2} ∘ γ_{3} If, in addition, we have

e) γ ≥_{σ} 1_{Γ} for all γ ∈ Γ then σ is called a term ordering on Γ.

If σ is a relation on Γ, and if γ_{1}, γ_{2} ∈ Γ are such that γ_{1} ≥_{σ} γ_{2} , we also write γ_{2} ≤_{σ} γ_{1} . Furthermore, if additionally γ_{1} ≠ γ_{2} , we write γ_{1} >_{σ} γ_{2} or γ_{2} <_{σ} γ_{1} . If the cancellation law holds in Γ, condition 1.4.1.d can be reversed as follows.

Remark 1.4.2. Let σ be a monoid ordering on Γ.

a) Suppose that the cancellation law holds in Γ, and let γ_{1}, γ_{2}, γ_{3} ∈ Γ. Then an inequality γ_{1} ∘ γ_{3} ≥_{σ} γ_{2} ∘ γ_{3} implies γ_{1} ≥_{σ} γ_{2} . This follows from the observation that γ_{2} >_{σ} γ_{1} implies γ_{2}∘γ_{3} ≥_{σ} γ_{1}∘γ_{3} by Definition 1.4.1.d, and equality is excluded by the cancellation law.

b) If Γ ≠ {1_{Γ} } and the cancellation law holds in Γ, then Γ is infinite. Namely, let γ ≠ 1_{Γ} be an element of Γ. Now let us consider the set S = {γ^{i} | i ∈ ℕ}. We have either 1_{Γ} >_{σ} γ or γ >_{σ} 1_{Γ} . In the first case 1_{Γ} >_{σ} γ >_{σ} γ^{2} >_{σ} ⋯ shows that S is infinite. In the second case we argue analogously.

c) By induction we can show that, for any γ ∈ Γ and any n > 0, the condition γ ≥_{σ} 1_{Γ} is equivalent to γ^{n} ≥_{σ} 1_{Γ} .

Under the isomorphism of monoids log : 𝕋^{n} → ℕ^{n}, monoid orderings (resp. term orderings) on 𝕋^{n} correspond 1-1 to monoid orderings (resp. term orderings) on ℕ^{n}. Now we introduce some of the most important term orderings on 𝕋^{n}.

Definition 1.4.3. For t_{1}, t_{2} ∈ 𝕋^{n} we say t_{1} ≥_{Lex} t_{2} if and only if the first non-zero component of log(t_{1}) − log(t_{2}) is positive or t_{1} = t_{2} . It is easy to check that this defines a term ordering on 𝕋^{n} — it is called the lexicographic term ordering and is denoted by Lex.

Example 1.4.4. Using Lex, the indeterminates are ordered decreasingly, i.e. by x_{1} >_{Lex} x_{2} >_{Lex} ⋯ >_{Lex} x_{n}. For instance, when n = 3, we have x_{1}x_{2}^{2} >_{Lex} x_{2}^{3}x_{3}^{4} , since (1, 2, 0) − (0, 3, 4) = (1, −1, −4) has a positive first component. Similarly, we have x_{1}^{3}x_{2}^{2}x_{3}^{4} >_{Lex} x_{1}^{3}x_{2}^{2}x_{3} , since the first non-zero component of (3, 2, 4)−(3, 2, 1) = (0, 0, 3) is positive. Also x_{1}x_{3} >_{Lex} x_{2}^{2} , and we see how to use Lex to order the polynomial mentioned at the beginning of the section.

For n = 26, if one replaces x_{26} by A, x_{25} by B, etc., and one decides to write “smallest first”, then the lexicographic ordering on the terms becomes similar to the usual ordering on words in a dictionary. We say similar and not equal because there is a fundamental difference between our words and the words in a dictionary. Our words (or terms) are commutative, so in our lexicon the two words ape and pea are the same. Although this book is entirely about commutative things, we must admit that non-commutative dictionaries have certain advantages.

Definition 1.4.5. For two terms t_{1}, t_{2} ∈ 𝕋^{n} we say t_{1} ≥_{DegLex} t_{2} if we have deg(t_{1}) > deg(t_{2}), or if we have deg(t_{1}) = deg(t_{2}) and t_{1} ≥_{Lex} t_{2} . It is easy to check that this, too, defines a term ordering on 𝕋^{n} — it is called the degree-lexicographic term ordering and is denoted by DegLex.

Example 1.4.6. Using DegLex, we see that x_{1} >_{DegLex} ⋯ >_{DegLex} x_{n} holds again. For instance, when n = 3, we have x_{1}x_{2}^{2}x_{3}^{3} >_{DegLex} x_{1}^{2}x_{2}^{2} , since deg(x_{1}x_{2}^{2}x_{3}^{3}) = 6 > 4 = deg(x_{1}^{2}x_{2}^{2}), and we have x_{1}^{2}x_{2}^{2}x_{3}^{2} >_{DegLex} x_{1}x_{2}^{2}x_{3}^{3} , since deg(x_{1}^{2}x_{2}^{2}x_{3}^{2}) = 6 = deg(x_{1}x_{2}^{2}x_{3}^{3}) and (2, 2, 2) − (1, 2, 3) = (1, 0, −1) has a positive first component.

Definition 1.4.7. For t_{1}, t_{2} ∈ 𝕋^{n} we say t_{1} ≥_{DegRevLex} t_{2} if we have deg(t_{1}) > deg(t_{2}), or if we have deg(t_{1}) = deg(t_{2}) and the last non-zero component of log(t_{1}) − log(t_{2}) is negative, or if t_{1} = t_{2} . It is easy to check that this defines a term ordering on 𝕋^{n} — it is called the degree-reverse-lexicographic term ordering and is denoted by DegRevLex.

Example 1.4.8. Again, using DegRevLex, the indeterminates are ordered by x_{1} >_{DegRevLex} ⋯ >_{DegRevLex} x_{n}. For instance, when n = 3, we have x_{1}^{4}x_{2}^{7}x_{3} >_{DegRevLex} x_{1}^{4}x_{2}^{2}x_{3}^{3} , since deg(x_{1}^{4}x_{2}^{7}x_{3}) = 12 > 9 = deg(x_{1}^{4}x_{2}^{2}x_{3}^{3}), and we have x_{1}x_{2}^{5}x_{3}^{2} >_{DegRevLex} x_{1}^{4}x_{2}x_{3}^{3} , since both terms have degree 8 and (1, 5, 2) − (4, 1, 3) = (−3, 4, −1) has a negative last component. Similarly, we have x_{1}^{3}x_{2}^{3}x_{3}^{2} <_{DegRevLex} x_{1}^{4}x_{2}^{2}x_{3}^{2} , since both terms have degree 8 and the last non-zero component of (3, 3, 2) − (4, 2, 2) = (−1, 1, 0) is positive.

If we drop the first condition in the definition of DegRevLex, i.e. if we let t_{1} ≥_{RevLex} t_{2} if the last non-zero component of log(t_{1}) − log(t_{2}) is negative or if t_{1} = t_{2} , we obtain a monoid ordering on 𝕋^{n}, called the reverselexicographic ordering, which is not a term ordering (see Exercise 3).

Definition 1.4.9. A monoid ordering σ on 𝕋^{n} is called degree compatible if t_{1} ≥_{σ} t_{2} for t_{1}, t_{2} ∈ 𝕋^{n} implies deg(t_{1}) ≥ deg(t_{2}).

For instance, DegLex and DegRevLex are degree compatible term orderings.

Definition 1.4.10. Let 1 ≤ j < n, let L = {x_{1}, …, x_{j}}, and let t_{1} = x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}, t_{2} = x_{1}^{β_{1}} ⋯ x_{n}^{β_{n}} be two terms in 𝕋^{n}. We say t_{1} ≥_{Elim(L)} t_{2} if we have α_{1} + ⋯ + α_{j} > β_{1} + ⋯ + β_{j}, or if α_{1} + ⋯ + α_{j} = β_{1} + ⋯ + β_{j} and t_{1} ≥_{DegRevLex} t_{2} . It is easy to check that this defines a term ordering on 𝕋^{n} — it is called an elimination ordering for L and is denoted by Elim(L).

The orderings Elim(L) are members of a larger class of elimination orderings described in Section 3.4. Again the indeterminates are ordered by x_{1} >_{Elim(L)} ⋯ >_{Elim(L)} x_{n}.

Looking at these examples, we notice that they share a common property: the comparison of two terms is achieved by comparing their logarithms. Indeed, since the map log : 𝕋^{n} → ℕ^{n} is an isomorphism of monoids, one can use terms and their logarithms interchangeably. Thus in the above examples the comparison of terms is based on the comparison of the values of some linear functions on their logarithms.

For instance, if t_{1} = x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}, t_{2} = x_{1}^{β_{1}} ⋯ x_{n}^{β_{n}} and (γ_{1}, …, γ_{n}) = (α_{1} − β_{1}, …, α_{n} − β_{n}), then Definition 1.4.7 implies that t_{1} >_{DegRevLex} t_{2} if and only if the first non-zero component of (γ_{1} + … + γ_{n}, −γ_{n}, …, −γ_{2}) is positive. We see that the components of this vector are linear functions in the coordinates of log(t_{1}) − log(t_{2}). This leads us to introduce the following construction.

Definition 1.4.11. Let v_{1}, …, v_{n} ∈ ℤ^{n} be linearly independent vectors, and let V be the non-singular matrix whose i^{th} row is v_{i} for i = 1, …, n. For t_{1}, t_{2} ∈ 𝕋^{n}, we say t_{1} ≥_{Ord(V)} t_{2} if t_{1} = t_{2} or if the first non-zero coordinate of the vector V · (log(t_{1}) − log(t_{2})) is positive, where · denotes the usual matrix-by-vector product and (log(t_{1}) − log(t_{2})) has to be considered as a column vector. It is easy to check that this defines a monoid ordering Ord(V) on 𝕋^{n}. We call it the ordering represented by V .

Proposition 1.4.12. Let V be the matrix whose rows are linearly independent vectors v_{1}, …, v_{n} ∈ ℤ^{n}. Then Ord(V) is a term ordering if and only if the first non-zero element in each column of V is positive.

Proof. It is clear that a monoid ordering σ on 𝕋^{n} is a term ordering if and only if x_{i} >_{σ} 1 for i = 1, …, n. Let a_{i} be the first non-zero element of the i^{th} column of V . Then V · (log(x_{i}) − log(1)) = (0, …, 0, a_{i}, …)^{tr} shows that x_{i} >_{Ord(V)} 1 is equivalent to a_{i} > 0. □

For example, it is easy to see that Lex is the ordering represented by the identity matrix, and from the above description of DegRevLex it follows that it is represented by the matrix

V = ( \begin{matrix}1 & 1 & … & 1 & 1 \\ 0 & 0 & … & 0 & −1 \\ 0 & 0 & … & −1 & 0 \\ … & … & … & … & … \\ 0 & −1 & 0 & … & 0 \end{matrix} )

Also for the other monoid orderings introduced above it is possible to see that they are represented by some matrix (see Exercise 6). There is a complete classification of monoid orderings on 𝕋^{n}. It says that they essentially are all of type Ord(V), where V is a matrix with entries in ℝ (see Exercise 7). For computational purposes, monoid orderings represented by integral matrices as above are good enough.

Our next two propositions deal with the question how term orderings behave under restrictions and extensions of the monoids on which they are defined.

Proposition 1.4.13. Let σ be a monoid ordering on 𝕋^{n}, and let 𝕋_{i}^{n−1} be the monoid of terms in the indeterminates x_{1}, …, x_{i−1}, x_{i+1}, …, x_{n}.

a) The restriction σ_{i} of σ to 𝕋_{i}^{n−1} is a monoid ordering.

b) If σ is a term ordering then also σ_{i} is a term ordering.

c) Suppose that σ is represented by a matrix V . Then σ_{i} is represented by the matrix V_{i} which is obtained from V by first deleting the i^{th} column and then the first row which is linearly dependent on those above it.

Proof. The first assertion is clear since 𝕋_{i}^{n−1} can be viewed as a submonoid of 𝕋^{n}. The second one follows immediately from the definition of a term ordering. To prove c), we observe that if we disregard the i^{th} indeterminate, we must delete the i^{th} column from V . Then we are left with a matrix of shape n × (n − 1) and rank n − 1. We delete the first row which depends on those above it, because if for a vector all the previous scalar products vanish, then also the scalar product with the dependent row vanishes. Thus we get a matrix V_{i} of shape (n − 1) × (n − 1) and rank n − 1. It represents σ_{i}, because for all t_{1}, t_{2} ∈ 𝕋_{i}^{n−1} the vector V_{i} · (log(t_{1}) − log(t_{2})) agrees with V · (log(t_{1}) − log(t_{2})), except that we have to regard t_{1} and t_{2} as elements of 𝕋^{n} and to remove the entry corresponding to the deleted row. □

Proposition 1.4.14. Every monoid ordering σ on ℕ^{n} has a unique extension to a monoid ordering σ′ on ℤ^{n}.

Proof. For v ∈ ℤ^{n}, there exist vectors v_{1}, v_{2} ∈ ℕ^{n} such that v = v_{1} − v_{2} . We say v ≤_{σ′} 0 if and only if v_{1} ≤_{σ} v_{2} . To see that this is well-defined, we take two representations v = v_{1} − v_{2} = v′_{1} − v′_{2} with v_{1}, v_{2}, v′_{1}, v′_{2} ∈ ℕ^{n} and note that v_{1} ≤_{σ} v_{2} is equivalent to v_{1} + v′_{2} ≤_{σ} v_{2} + v′_{2} by Remark 1.4.2.a. This in turn is equivalent to v′_{1} + v_{2} ≤_{σ} v_{2} + v′_{2} , and therefore to v′_{1} ≤_{σ} v′_{2} . If we now define v ≤_{σ′} w ⟺ v − w ≤_{σ′} 0 for v, w ∈ ℤ^{n}, it is easy to check that Axioms a) – d) of Definition 1.4.1 are satisfied.

The uniqueness of σ′ follows from the observation that, for v, v′ ∈ ℤ^{n} such that v = v_{1} − v_{2} and v′ = v′_{1} − v′_{2} with v_{1}, v_{2}, v′_{1}, v′_{2} ∈ ℕ^{n}, the condition v ≤_{σ′} v′ is equivalent to v_{1} + v′_{2} ≤_{σ} v′_{1} + v_{2} . □

In view of this proposition, and by extending Lex to ℤ^{n}, we can rephrase Definition 1.4.11 as follows: t_{1} ≥_{Ord(V)} t_{2} ⟺ V · (log(t_{1}) − log(t_{2})) ≥_{Lex} 0 for t_{1}, t_{2} ∈ 𝕋^{n}.

The proposition also implies that studying monoid orderings on 𝕋^{n} is equivalent to studying monoid orderings on ℤ^{n}. In particular, we shall use the same symbol for a monoid ordering on 𝕋^{n}, its translation to ℕ^{n}, and its unique extension to ℤ^{n}. In particular, we may apply this notational convention and say that for a monoid ordering σ on 𝕋^{n} and t_{1}, t_{1} ∈ 𝕋^{n} we have t_{1} ≥_{σ} t_{2} ⟺ log(t_{1}) − log(t_{2}) ≥_{σ} 0.

The final part of this section treats the extension of the theory of monoid orderings to orderings on monomial modules. More precisely, for n, r ≥ 1, we want to define suitable orderings on the set of terms 𝕋^{n}⟨e_{1}, …, e_{r}⟩ introduced in Definition 1.1.10.

Definition 1.4.15. Let (Γ, ∘) be a monoid and (Σ, ∗) a Γ -monomodule. A complete relation σ on Σ is called a module ordering if for all s_{1}, s_{2}, s_{3} ∈ Σ and all γ ∈ Γ we have

a) s_{1} ≥_{σ} s_{1} (reflexivity)

b) s_{1} ≥_{σ} s_{2} and s_{2} ≥_{σ} s_{1} imply s_{1} = s_{2} (antisymmetry)

c) s_{1} ≥_{σ} s_{2} and s_{2} ≥_{σ} s_{3} imply s_{1} ≥_{σ} s_{3} (transitivity)

d) s_{1} ≥_{σ} s_{2} implies γ ∗ s_{1} ≥_{σ} γ ∗ s_{2} If, in addition, we have

e) γ ∗ s ≥_{σ} s for all s ∈ Σ and all γ ∈ Γ then σ is called a module term ordering on Σ.

For us, the most important case will be the case Γ = 𝕋^{n} and Σ = 𝕋^{n}⟨e_{1}, …, e_{r}⟩. If r = 1, then module orderings are monoid orderings on 𝕋^{n} = 𝕋^{n}⟨e_{1}⟩ as introduced in Definition 1.4.1, and module term orderings are nothing but term orderings. We also note that it is easy to see that in this case condition e) is equivalent to te_{i} ≥_{σ} e_{i} for all t ∈ 𝕋^{n} and all i = 1, …, r.

The most important module orderings for our purposes are constructed as follows.

Example 1.4.16. Let To be a term ordering on 𝕋^{n}.

a) For t_{1}e_{i}, t_{2}e_{j} ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ such that t_{1}, t_{2} ∈ 𝕋^{n} and i, j ∈ {1, …, r}, we let

t_{1}e_{i} ≥_{ToPos} t_{2}e_{j}  ⟺  t_{1} >_{To} t_{2} or (t_{1} = t_{2} and i ≤ j)

In this way we obtain a module term ordering ToPos on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. The intuitive meaning of ToPos is that one first compares the two power products using To and then breaks ties by looking at their positions in the vector.

b) For t_{1}e_{i}, t_{2}e_{j} ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ such that t_{1}, t_{2} ∈ 𝕋^{n} and i, j ∈ {1, …, r}, we let

t_{1}e_{i} ≥_{PosTo} t_{2}e_{j}  ⟺  i < j or (i = j and t_{1} ≥_{To} t_{2})

Again we obtain a module term ordering PosTo on 𝕋^{n}⟨e_{1}, …, e_{r}⟩.

Definition 1.4.17. Let (Γ, ∘) be a monoid, let τ be a monoid ordering on Γ, and let (Σ, ∗) be a Γ -monomodule. We say that a module ordering σ on Σ is compatible with τ if γ_{1} ≥_{τ} γ_{2} implies γ_{1} ∗s ≥_{σ} γ_{2} ∗s for all γ_{1}, γ_{2} ∈ Γ and all s ∈ Σ.

For instance, if To is a monoid ordering on 𝕋^{n}, then both module orderings ToPos and PosTo on 𝕋^{n}⟨e_{1}, …, e_{r}⟩ are compatible with To. We end this section by describing a fundamental property of term orderings.

Proposition 1.4.18. (Well-Orderings) Let (Γ, ∘) be a monoid, (Σ, ∗) a Γ -monomodule, and σ a module ordering on Σ. Then the following conditions are equivalent.

a) Every non-empty subset of Σ has a minimal element with respect to σ.

b) Every descending chain s_{1} ≥_{σ} s_{2} ≥_{σ} ⋯ in Σ is eventually stationary. If these conditions are satisfied, the ordering σ is called a well-ordering. If the left-cancellation law holds in Σ, then every well-ordering is a module term ordering.

Proof. The implication a) ⇒ b) follows from the fact that the set of elements of a descending chain has a minimal element if and only if the chain is eventually stationary. Conversely, if there is a non-empty subset Σ′ ⊂ Σ having no minimal element with respect to σ, we can obviously construct an infinite, strictly descending chain of elements of Σ′.

To prove the additional claim, we observe that if s >_{σ} γ ∗ s for some γ ∈ Γ and s ∈ Σ, then s >_{σ} γ ∗ s >_{σ} γ^{2} ∗ s >_{σ} ⋯ is an infinite chain which is not eventually stationary. □

Theorem 1.4.19. (Fundamental Property of Term Orderings) For a module ordering σ on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, the following conditions are equivalent.

a) The relation σ is a module term ordering.

b) The relation σ is a well-ordering.

Proof. In view of the previous proposition and the fact that the leftcancellation law holds in 𝕋^{n}⟨e_{1}, …, e_{r}⟩, it suffices to prove a) ⇒ b). We suppose there is a chain t_{1}e_{γ_{1}} ≥_{σ} t_{2}e_{γ_{2}} ≥_{σ} ⋯ in 𝕋^{n}⟨e_{1}, …, e_{r}⟩ which is not eventually stationary, where t_{1}, t_{2}, … ∈ 𝕋^{n} and γ_{1}, γ_{2}, … ∈ {1, …, r}. For some i ∈ {1, …, r}, we then have a subchain t_{δ_{1}}e_{i} ≥_{σ} t_{δ_{2}}e_{i} ≥_{σ} ⋯ such that 1 ≤ δ_{1} < δ_{2} < ⋯ which is not eventually stationary. By Dickson’s Lemma 1.3.6, the monoideal (t_{δ_{1}}, t_{δ_{2}}, …) is generated by finitely many terms t_{δ_{1}}, …, t_{δ_{N}} for some N > 0. Since σ is a module term ordering, it follows that for each j > N there exists a number k ∈ {1, …, N} such that t_{δ_{j}}e_{i} ≥_{σ} t_{δ_{k}}e_{i}, a contradiction. □

Exercise 1. Prove that the relations Lex, DegLex, DegRevLex, and Elim(L) on 𝕋^{n} are term orderings.

Exercise 2. For each of the term orderings Lex, DegLex, and DegRevLex, write down the 20 smallest terms of 𝕋^{3} in increasing order.

Exercise 3. Define a relation RevLex on 𝕋^{n} by t_{1} ≥_{RevLex} t_{2} if the last non-zero component of log(t_{1}) − log(t_{2}) is negative, or if t_{1} = t_{2} . Show that RevLex is a monoid ordering on 𝕋^{n} which is not a term ordering. How are the indeterminates ordered by RevLex?

Exercise 4. Go back to Example 1.4.4, replace x_{1} by A, x_{2} by B, etc., and decide to write “biggest first”. What is the monoid ordering on 𝕋^{n} similar to the usual ordering on words in a dictionary?

Exercise 5. Let V be a matrix whose rows are linearly independent vectors v_{1}, …, v_{n} ∈ ℤ^{n}. Prove that the relation Ord(V) is a monoid ordering on 𝕋^{n}.

Exercise 6. For each of the term orderings Lex, DegLex, DegRevLex, and Elim(L), give a non-singular matrix V such that they are represented by V .

Exercise 7. Let u = (1, \sqrt{2}) and let σ be the relation on 𝕋^{2} defined by t_{1} ≥_{σ} t_{2} if and only if u · (log(t_{1}) − log(t_{2})) ≥ 0 for t_{1}, t_{2} ∈ 𝕋^{2} .

a) Show that σ is a term ordering on 𝕋^{2} .

b) Show that σ cannot be represented by any matrix of integers. Hint: Prove that, for any term ordering τ represented by a matrix of integers, there exist terms t, t′ ∈ 𝕋^{2} such that t >_{σ} t′ and t <_{τ} t′.

Exercise 8. Prove that every monoid ordering σ on ℤ^{n} has a unique extension to a monoid ordering σ′ on ℚ^{n}. Hint: A vector v ∈ ℚ^{n} can be represented in the form v = \frac{1}{q} ·p with q > 0 and p ∈ ℤ^{n}. Then define v ≥_{σ′} 0 if and only if p ≥_{σ} 0. To see that this is well-defined, take two representations v = \frac{1}{q} · p = \frac{1}{q′} · p′ with q, q′ > 0 and p, p′ ∈ ℤ^{n} and prove p ≥_{σ} 0 ⟺ q′p ≥_{σ} 0.

Exercise 9. Show that the relations ToPos and PosTo defined in Example 1.4.16 are module term orderings.

Exercise 10. Let K be a field, let P = K[x_{1}, …, x_{n}], and let e_{1}, …, e_{r} be new indeterminates. Consider the P -linear map φ : P^{r} ⟶ P [e_{1}, …, e_{r}] defined by φ((f_{1}, …, f_{r})) = f_{1}e_{1} + ⋯ + f_{r}e_{r}.

a) Show that φ is an injective homomorphism of P -modules. Using φ, we identify P^{r} with the corresponding submodule of P [e_{1}, …, e_{r}]. Let ϑ be a monoid ordering on 𝕋^{n+r} = 𝕋(x_{1}, …, x_{n}, e_{1}, …, e_{r}), let τ be the monoid ordering on 𝕋^{n} obtained by restriction of ϑ (see Proposition 1.4.13), and let σ be the ordering induced by ϑ on 𝕋^{n}⟨e_{1}, …, e_{r}⟩ via φ.

b) Prove that σ is module ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩.

c) Prove that σ is compatible with τ.

Exercise 11. Let σ be a module ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. View 𝕋^{n}⟨e_{1}, …, e_{r}⟩ as a disjoint union of r components, each of which is a copy of 𝕋^{n}, and denote the restriction of σ to the i^{th} component by σ_{i}.

a) Prove that σ_{i} is a monoid ordering for every i = 1, …, r.

b) Let τ be a monoid ordering on 𝕋^{n} such that σ is compatible with τ. Prove that σ_{i} = τ for every i = 1, …, r.

Tutorial 9: Monoid Orderings Represented by Matrices

Let (v_{1}, …, v_{n}), (v′_{1}, …, v′_{n}) be two n-tuples of linearly independent vectors in ℚ^{n}, and let V, V′ ∈ Mat_{n}(ℚ) be the matrices having those vectors as rows.

a) Extend Definition 1.4.11 to orderings represented by rational matrices like V ∈ Mat_{n}(ℚ).

b) Suppose there exists a lower triangular matrix W ∈ Mat_{n}(ℚ) whose entries in the diagonal are positive such that V′ = W V . Prove that Ord(V) = Ord(V′).

c) Prove that Ord(V) can be represented by a matrix in Mat_{n}(ℤ).

d) Prove that if σ is a term ordering represented by a rational matrix V , then it can also be represented by a rational matrix V′ whose entries are non-negative.

e) Find such a representation for DegRevLex.

f) Prove the following partial converse of b). If Ord(V) = Ord(V′), then there exists a rational number λ > 0 such that v′_{1} = λv_{1} . g) Now we assume that v′_{1} ≠ λv_{1} for all λ > 0. Write a CoCoA program

TODifference(…) which computes two terms t_{1}, t_{2} ∈ 𝕋^{n} such that t_{1} >_{Ord(V)} t_{2} and t_{1} <_{Ord(V′)} t_{2} .

h) Write a CoCoA program CheckEquality(…) which checks for a given number d > 0 if the term orderings represented by V and V′ agree for all terms of degree ≤ d in 𝕋^{n}.

i) (This part is a much more elaborate project.) Find criteria which characterize when V and V′ represent the same monoid ordering.

Tutorial 10: Classification of Term Orderings

In this tutorial we want to get a good understanding of all possible term orderings on 𝕋^{n} for n ≤ 3.

a) Prove that on 𝕋^{1} there is only one term ordering, namely Deg.

b) Show that on 𝕋^{2} there are precisely two degree compatible term orderings σ, τ which are characterized by x_{1} >_{σ} x_{2} and x_{2} >_{τ} x_{1} .

c) Classify all possible term orderings on 𝕋^{2} which satisfy x_{1} >_{σ} x_{2} . To do that use the following scheme.

1) Prove that there exists exactly one term ordering σ on 𝕋^{2} such that x_{1} >_{σ} x_{2}^{i} for all i ≥ 2.

2) Suppose that a term ordering σ on 𝕋^{2} satisfies x_{1} <_{σ} x_{2}^{N} for some N ≥ 2, and let q = inf\{\frac{j}{i} ∈ ℚ_{+} | x_{1}^{i} <_{σ} x_{2}^{j}\}. Prove that 1 ≤ q ≤ N.

3) Following 2), suppose that q ∈ ℝ \ ℚ. Show that there exists exactly one term ordering σ with those properties and that it satisfies x_{1}^{i_{1}}x_{2}^{i_{2}} ≥_{σ} x_{1}^{j_{1}}x_{2}^{j_{2}} if and only if i_{1}q + i_{2} ≥ j_{1}q + j_{2} .

4) Following 2), suppose that q ∈ ℚ \ {1}. Show that there exist exactly two term orderings with those properties. Prove that they are represented by matrices by exhibiting the matrices.

5) Finally, if q = 1 in 2), show that there exists exactly one term or-

dering with those properties and that it is represented by a matrix.

d) For all terms of degree ≤ 2 in 𝕋^{3} , find all orderings induced by degree compatible term orderings. You may assume that the indeterminates are numbered in such a way that x_{1} >_{σ} x_{2} >_{σ} x_{3} .

e) Repeat the previous part for all terms of degree ≤ 3 in 𝕋^{3} .

f) Prove that there are infinitely many different degree compatible term orderings on 𝕋^{3} .

g) Write a CoCoA program TermOrderList(…) which takes two numbers i, d > 0, defines a degree compatible term ordering TO_{i} on 𝕋^{3} which is different for each i, and returns the list of all terms of degree ≤ d ordered according to TO_{i}.

1.5 Leading Terms

The real leader has no need to lead. He is content to point the way.

(Henry Miller)

In the last section we saw how to order terms. A first consequence is that, once a monoid ordering on 𝕋^{n} is chosen, we can sort the terms in the support of a polynomial, and therefore represent the polynomial in a unique way as a sum. This provides us with a new way of looking at polynomials.

In some sense, as soon as the ordering is given and the polynomial f(x_{1}, x_{2}, x_{3}) = x_{1}x_{3} − x_{2}^{2} + x_{1} is written just as you see it (for instance if you are using DegLex), we can say that −x_{2}^{2} + x_{1}x_{3} + x_{1} is not allowed anymore. If in the process of some computation −x_{2}^{2} + x_{1}x_{3} + x_{1} shows up somewhere, it is automatically converted to x_{1}x_{3} − x_{2}^{2} + x_{1} . This does not violate the commutativity law, rather it conveys the idea that the equality x_{1}x_{3} − x_{2}^{2} + x_{1} = −x_{2}^{2} + x_{1}x_{3} + x_{1} should be interpreted in the following way. The polynomial f(x_{1}, x_{2}, x_{3}), written correctly with the sequence of symbols x_{1}x_{3} − x_{2}^{2} + x_{1} , is equal to the polynomial −x_{2}^{2} + x_{1}x_{3} + x_{1} , because −x_{2}^{2} + x_{1}x_{3} + x_{1} is automatically converted to x_{1}x_{3} − x_{2}^{2} + x_{1} , and this is the same sequence of symbols as before.

The hierarchy created among the terms in Supp(f) by the monoid ordering implies that x_{1}x_{3} becomes “bigger” and “more important” than the other terms. Should it be called the “leader”, the “initial”, or the “head”? We call it the leading term of f(x_{1}, x_{2}, x_{3}). Of course all of this can and will be extended to module orderings.

The first part of this section is devoted to explaining these concepts and to getting a better insight into their mathematical meaning. Then we address a very important problem. One of the main ideas in Computational Commutative Algebra is to study or detect properties of ideals and modules using the information coming from their associated leading term ideals and modules. The reason is that the latter objects, whose nature is purely combinatorial, are easier to deal with, and the first step in this direction is Macaulay’s Basis Theorem.

Suppose we have an ideal I in a polynomial ring P = K[x_{1}, …, x_{n}] over a field K. It is clear that the residue class ring P/I can be viewed as a K -vector space. Some natural questions arise. Is it possible to exhibit an explicit basis? Can we compute it? The second question will take much more effort, but with the aid of leading terms, Macaulay’s Basis Theorem yields a beautiful answer to the first one. This theorem requires the assumption that the module ordering is a term ordering. Thus we see, for the first time, the theoretical importance of term orderings.

In the final part of this section we show how two fundamental term orderings, Lex and DegRevLex, can be characterized using the kind of leading terms they produce.

In what follows, we let R be a ring, n ≥ 1, P = R[x_{1}, …, x_{n}] a polynomial ring, r ≥ 1, and σ a module ordering on the set of terms 𝕋^{n}⟨e_{1}, …, e_{r}⟩ of P^{r}. The standard basis of P^{r} will be denoted by {e_{1}, …, e_{r}} as usual.

Remark 1.5.1. Every element m ∈ P^{r} \ {0} has a unique representation as a linear combination of terms

m = ∑_{i=1}^{s} c_{i}t_{i}e_{γ_{i}}

where c_{1}, …, c_{s} ∈ R\{0}, t_{1}, …, t_{s} ∈ 𝕋^{n}, γ_{1}, …, γ_{s} ∈ {1, …, r}, and where t_{1}e_{γ_{1}} >_{σ} t_{2}e_{γ_{2}} >_{σ} ⋯ >_{σ} t_{s}e_{γ_{s}}.

If we write m = f_{1}e_{1} + ⋯ + f_{r}e_{r}, where f_{1}, …, f_{r} ∈ P, then we have Supp(f_{i}) = {t_{j} | γ_{j} = i} for each i ∈ {1, …, r}.

Definition 1.5.2. For a non-zero element m ∈ P^{r}, let m = ∑_{i=1}^{s} c_{i}t_{i}e_{γ_{i}} be the representation according to Remark 1.5.1.

a) The term LT_{σ}(m) = t_{1}e_{γ_{1}} ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ is called the leading term of m with respect to σ.

b) The element LC_{σ}(m) = c_{1} ∈ R \ {0} is called the leading coefficient of m with respect to σ. If LC_{σ}(m) = 1, we say that m is σ -monic, or simply monic if σ is clear from the context.

c) We let LM_{σ}(m) = LC_{σ}(m) · LT_{σ}(m) = c_{1}t_{1}e_{γ_{1}} . For the zero vector m = (0, …, 0), we recall from Definition 1.1.11 that

Supp(m) = ∅. The leading term LT_{σ}(m) and the leading coefficient LC_{σ}(m) are not defined.

Note that the leading term of a vector m ∈ P^{r} \ {0} really consists of two data: the term t_{1} ∈ 𝕋^{n} which is sometimes also called the leading power product of m, and the position γ_{1} ∈ {1, …, r} of this term which is sometimes called the leading position of m. In CoCoA, the leading power product of a vector can be obtained using the function LPP(…), and the leading position is accessible via LPos(…).

With respect to the usual operations such as addition and multiplication of polynomials, leading terms behave pretty much as one would expect: the leading term of a sum is the biggest leading term of one of the summands, except if some “cancellation” occurs, and the leading term of the product is the product of the leading terms, except for some pathological cases. Let us collect the precise rules.

Proposition 1.5.3. (Rules for Computing with Leading Terms) As above, we let P = R[x_{1}, …, x_{n}] be a polynomial ring over a ring R and σ a module ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. Moreover, let f, f_{1}, f_{2} ∈ P be non-zero polynomials, and let m, m_{1}, m_{2} ∈ P^{r} be non-zero vectors of polynomials. a) We have Supp(m_{1} + m_{2}) ⊆ Supp(m_{1}) ∪ Supp(m_{2}), and if moreover

m_{1} + m_{2} ≠ 0, then LT_{σ}(m_{1} + m_{2}) ≤_{σ} max_{σ}{LT_{σ}(m_{1}), LT_{σ}(m_{2})}.

b) Suppose that m_{1} + m_{2} ≠ 0, and suppose that LT_{σ}(m_{1}) ≠ LT_{σ}(m_{2}) or LC_{σ}(m_{1}) + LC_{σ}(m_{2}) ≠ 0. Then we have

LT_{σ}(m_{1} + m_{2}) = max_{σ}{LT_{σ}(m_{1}), LT_{σ}(m_{2})}

c) For t ∈ 𝕋^{n}, we have LT_{σ}(tm) = t · LT_{σ}(m).

d) If R is an integral domain, and if t is the term in Supp(f) for which t · LT_{σ}(m) is maximal with respect to σ, then LT_{σ}(fm) = t · LT_{σ}(m).

e) If R is an integral domain, and if τ is a monoid ordering on 𝕋^{n} such that σ is compatible with τ, then we have

LT_{σ}(fm) = LT_{τ} (f) · LT_{σ}(m)

In particular, if R is an integral domain, then LT_{τ} (f_{1}f_{2}) = LT_{τ} (f_{1}) · LT_{τ} (f_{2}).

Proof. To prove a), write m_{1} = ∑_{i=1}^{s} c_{i}t_{i}e_{γ_{i}} and m_{2} = ∑_{j=1}^{s′} c′_{j}t′_{j}e_{γ′_{j}} according to Remark 1.5.1. From the representation

m_{1} + m_{2} = ∑_{i=1}^{r} ∑_{t∈𝕋^{n}} ( ∑_{{j|t_{j}=t,γ_{j}=i}} c_{j} + ∑_{{j|t′_{j}=t,γ′_{j}=i}} c′_{j})te_{i}

we conclude that Supp(m_{1} + m_{2}) ⊆ Supp(m_{1}) ∪ Supp(m_{2}) and also that te_{i} ≤_{σ} max_{σ}{t_{1}e_{γ_{1}}, t′_{1}e_{γ′_{1}}} for all te_{i} ∈ Supp(m_{1} + m_{2}).

For the proof of b), we represent m_{1} , m_{2} and m_{1} + m_{2} as above. If we have LT_{σ}(m_{1}) = t_{1}e_{γ_{1}} = t′_{1}e_{γ′_{1}} = LT_{σ}(m_{2}), then c_{1} + c′_{1} ≠ 0 implies that LT_{σ}(m_{1} + m_{2}) = t_{1}e_{γ_{1}} = max_{σ}{t_{1}e_{γ_{1}}, t′_{1}e_{γ′_{1}}}. When t_{1}e_{γ_{1}} <_{σ} t′_{1}e_{γ′_{1}} or t_{1}e_{γ_{1}} >_{σ} t′_{1}e_{γ′_{1}} , the claim follows immediately from the above representation of m_{1} + m_{2} .

In order to show claim c), we write m = ∑_{i=1}^{s} c_{i}t_{i}e_{γ_{i}} as in Remark 1.5.1. Then tm = ∑_{i=1}^{s} c_{i}(tt_{i})e_{γ_{i}} is the representation of tm, since t_{i}e_{γ_{i}} >_{σ} t_{j}e_{γ_{j}} for 1 ≤ i < j ≤ s implies (tt_{i})e_{γ_{i}} >_{σ} (tt_{j})e_{γ_{j}}. Thus we obtain LT_{σ}(tm) = tt_{1}e_{γ_{1}} = t · LT_{σ}(m).

For the proof of d), we represent f = ∑_{i=1}^{s} c_{i}t_{i} and m = ∑_{j=1}^{s′} c′_{j}t′_{j}e_{γ_{j}} according to Remark 1.5.1. Then we have t_{i}t′_{j}e_{γ_{j}} ≤_{σ} t_{i} LT_{σ}(m) ≤_{σ} t LT_{σ}(m) for i = 1, …, s and for j = 1, …, s′. Let c_{k} be the coefficient of t in f. Now the claim follows from fm = ∑_{i=1}^{s} ∑_{j=1}^{s′}(c_{i}c′_{j})(t_{i}t′_{j})e_{γ_{j}} and c_{k}c′_{1} ≠ 0.

To prove e), we observe that if σ is compatible with τ, then the term t = LT_{τ} (f) is the unique element of Supp(f) for which t·LT_{σ}(m) is maximal with respect to σ. □

Definition 1.5.4. Let M ⊆ P^{r} be a P -submodule.

a) The module LT_{σ}(M) = ⟨LT_{σ}(m) | m ∈ M \ {0}⟩ is called the leading term module of M with respect to σ. b) If r = 1, i.e. if M ⊆ P, then the ideal LT_{σ}(M) ⊆ P is also called the

leading term ideal of M with respect to σ.

c) The monomodule {LT_{σ}(m) | m ∈ M \ {0}} ⊆ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ will be denoted by LT_{σ}{M}.

Notice that, for M = ⟨0⟩, we get LT_{σ}(M) = ⟨0⟩ and LT_{σ}{M} = ∅ using this definition. If m_{1}, …, m_{s} ∈ P^{r} are non-zero vectors, and if M = ⟨m_{1}, …, m_{s}⟩ ⊆ P^{r} is the submodule generated by them, we have ⟨LT_{σ}(m_{1}), …, LT_{σ}(m_{s})⟩ ⊆ LT_{σ}(M). The following example shows that this can be a proper inclusion.

Example 1.5.5. Let I be the ideal in K[x, y] generated by {x^{2} −1, xy−1}, and let σ = DegLex. Then f = y(x^{2} − 1) − x(xy − 1) = x − y ∈ I implies LT_{σ}(f) = x ∈ LT_{σ}(I), but x is not in the ideal generated by LT_{σ}(x^{2}−1) = x^{2} and LT_{σ}(xy − 1) = xy.

Nevertheless, there are systems of elements of M whose leading terms generate LT_{σ}(M) as our next proposition shows.

Proposition 1.5.6. Let M ⊆ P^{r} be a non-zero P-submodule.

a) Every term te_{i} ∈ LT_{σ}(M) with t ∈ 𝕋^{n} and 1 ≤ i ≤ r is of the form te_{i} = LT_{σ}(m) for some m ∈ M.

b) There exist non-zero elements m_{1}, …, m_{s} ∈ M such that we have LT_{σ}(M) = ⟨LT_{σ}(m_{1}), …, LT_{σ}(m_{s})⟩.

Proof. The elements of the set LT_{σ}{M} generate the R-module LT_{σ}(M). By Proposition 1.3.11.a, every term in LT_{σ}(M) is then of the form t·LT_{σ}(m) with t ∈ 𝕋^{n} and m ∈ M, and is therefore equal to LT_{σ}(tm). This proves a).

Theorem 1.3.9.a implies that LT_{σ}{M} is generated by finitely many terms as a monomodule over 𝕋^{n}. Thus those terms generate the R-module LT_{σ}(M), and using a) we get claim b). □

Now we are ready to prove the main result of this section. As we said before, Macaulay’s Basis Theorem requires the assumption that the module ordering is a term ordering. Furthermore, we need to assume that our base ring is a field.

Theorem 1.5.7. (Macaulay’s Basis Theorem) Let K be a field, let P = K[x_{1}, …, x_{n}] be a polynomial ring over K, let M ⊆ P^{r} be a P-submodule, and let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. We denote the set of all terms in 𝕋^{n}⟨e_{1}, …, e_{r}⟩ \ LT_{σ}{M} by B. Then the residue classes of the elements of B form a basis of the K -vector space P^{r}/M.

Proof. First we prove that the elements b̄ ∈ P^{r}/M such that b ∈ B form a system of generators of P^{r}/M. In other words, we need to prove that the vector subspace N = ∑_{b∈B} K ·b+M equals P^{r}. For a contradiction suppose that N ⊂ P^{r}. Then the set P^{r} \ N contains some non-zero elements. Hence Theorem 1.4.19 implies that there exists an element m of P^{r} \ N having a minimal leading term with respect to σ. If now LT_{σ}(m) ∈ B, then the element m − LC_{σ}(m) LT_{σ}(m) is still in P^{r} \ N and has a smaller leading term than m: a contradiction. Thus we need to have LT_{σ}(m) ∈ LT_{σ}{M}. So there exists an element m′ ∈ M such that LT_{σ}(m′) = LT_{σ}(m). Again the element m − \frac{LC_{σ}(m)}{LC_{σ}(m′)}m′ lies in P^{r} \ N and has a smaller leading term than m: a contradiction again.

Now we prove linear independence. Suppose there is a relation m = ∑_{i=1}^{s} c_{i}m_{i} ∈ M such that c_{1}, …, c_{s} ∈ K \{0} and m_{1}, …, m_{s} ∈ B. Then we have LT_{σ}(m) ∈ LT_{σ}{M}, since m ∈ M. We also have LT_{σ}(m) ∈ Supp(m) ⊆ {m_{1}, …, m_{s}} ⊆ B, because m_{1}, …, m_{s} are terms, and because of Proposition 1.5.3.a. Altogether we find LT_{σ}(m) ∈ LT_{σ}{M} ∩ B = ∅ which is impossible. □

To see how essential the assumption is that σ is a term ordering, consider the following example.

Example 1.5.8. Let P = K[x], let σ = Ord(−1), and let I be the principal ideal generated by x−x^{2} . Then LT_{σ}(x−x^{2}) = x, so that 𝕋^{1}\LT_{σ}{I} = {1}. However, the residue class of x cannot be a constant.

Remark 1.5.9. Macaulay’s Basis Theorem gives us a first idea of how to compute effectively in P^{r}/M. First we would need to know LT_{σ}(M) for some module term ordering σ, and then we could represent every element uniquely as a finite linear combination of the residue classes of the elements of B = 𝕋^{n}⟨e_{1}, …, e_{r}⟩ \ LT_{σ}{M}. Unfortunately, we do not yet know how to calculate LT_{σ}(M), and we cannot store the basis {b̄ | b ∈ B} in a computer, since it is in general infinite. In the next chapter we shall see how to overcome these problems.

To conclude this section, we show how to characterize two of the most important term orderings on 𝕋^{n}, namely Lex and DegRevLex in terms of their behaviour when they are used to order polynomials. So, for the rest of the section, let R be a ring, and let P = R[x_{1}, …, x_{n}].

Proposition 1.5.10. Let σ be a monoid ordering on 𝕋^{n}. Then the following conditions are equivalent.

a) σ = Lex

b) For f ∈ P and i ∈ {1, …, n} such that LT_{σ}(f) ∈ R[x_{i}, …, x_{n}], we have f ∈ R[x_{i}, …, x_{n}].

Proof. To prove a) ⇒ b), let f ∈ P be such that LT_{Lex}(f) ∈ R[x_{i}, …, x_{n}]. If t ∈ Supp(f)\{LT_{Lex}(f)}, then by Definition 1.4.3 the first non-zero component of log(LT_{Lex}(f))−log(t) is positive. But since the first i−1 components of LT_{Lex}(f) are zero, also the first i − 1 components of log(t) have to be zero. Thus we get t ∈ R[x_{i}, …, x_{n}] for all t ∈ Supp(f).

Now we prove b) ⇒ a). Let us consider two terms t_{1}, t_{2} ∈ 𝕋^{n} such that log(t_{1}) − log(t_{2}) = (0, …, 0, c_{i−1}, …, c_{n}), with c_{i−1} > 0. The first i − 2 coordinates of log(t_{1}) and log(t_{2}) are equal, so we can use property d) of Definition 1.4.1 and assume that they are zero. For the same reason we can also assume that the (i − 1)^{st} coordinate of log(t_{2}) is zero, while the (i − 1)^{st} coordinate of log(t_{1}) is different from zero. Next we consider the polynomial f = t_{1} + t_{2} . Suppose for contradiction that LT_{σ}(f) = t_{2} . Then LT_{σ}(f) ∈ R[x_{i}, …, x_{n}], and b) implies that also f ∈ R[x_{i}, …, x_{n}]. Consequently, we see that t_{1} = f − t_{2} ∈ R[x_{i}, …, x_{n}], in contradiction with the fact that the (i−1)^{st} coordinate of log(t_{1}) is different from zero. Therefore we have LT_{σ}(f) = t_{1} , i.e. t_{1} >_{σ} t_{2} .

Altogether, we have shown that t_{1} >_{Lex} t_{2} implies t_{1} >_{σ} t_{2} . By interchanging t_{1} and t_{2} , we find that t_{1} >_{Lex} t_{2} if and only if t_{1} >_{σ} t_{2} . Therefore we have σ = Lex. □

Proposition 1.5.11. Let σ be a monoid ordering on 𝕋^{n}. Then the following conditions are equivalent.

 a) σ = RevLex

b) For f ∈ P and i ∈ {1, …, n} such that LT_{σ}(f) ∈ (x_{i}, ..., x_{n}), we have f ∈ (x_{i}, ..., x_{n}).

Proof. To prove a) ⇒ b), let f ∈ P be such that LT_{σ}(f) is in the ideal (x_{i}, …, x_{n}). If t ∈ Supp(f)\{LT_{σ}(f)}, then by the definition of RevLex, the last non-zero component of log(LT_{σ}(f)) − log(t) is negative. But since the last non-zero component of log(LT_{σ}(f)) is in a position between i and n, also the last non-zero component of log(t) has to be in a position between i and n. This means that all the terms in Supp(f) have to be in the ideal (x_{i}, …, x_{n}).

Now we prove b) ⇒ a). Let t_{1}, t_{2} be two terms in 𝕋^{n} such that log(t_{1}) − log(t_{2}) = (c_{1}, …, c_{i}, 0, …, 0), with c_{i} < 0. The last n − i coordinates of log(t_{1}) and log(t_{2}) are equal, so we can use property d) of Definition 1.4.1 and assume that they are zero. For the same reason we can also assume that the i^{th} coordinate of log(t_{1}) is zero while the i^{th} coordinate of log(t_{2}) is different from zero. Let us consider the polynomial f = t_{1} + t_{2} . Suppose for contradiction that LT_{σ}(f) = t_{2} . Then LT_{σ}(f) ∈ (x_{i}, ..., x_{n}), and b) implies that also f ∈ (x_{i}, ..., x_{n}). Consequently, we have t_{1} = f − t_{2} ∈ (x_{i}, ..., x_{n}), in contradiction with the fact that the last n − i coordinates of log(t_{1}) are zero. Therefore LT_{σ}(f) = t_{1} , i.e. we have t_{1} >_{σ} t_{2} , and we may conclude that σ = RevLex. □

Later on in this Chapter (see Section 1.7) and in the second volume we will study the concepts of gradings and homogeneity in great detail. However, for the moment it is enough to recall that a polynomial of degree d is said to be homogeneous if all the terms in its support have degree d. Also, we refer to Definition 1.4.9 for the notion of degree-compatible term orderings.

Then an easy modification of the proof of the preceding proposition yields the following characterization of the degree-reverse-lexicographic term ordering.

Corollary 1.5.12. Let σ be a degree-compatible term ordering on 𝕋^{n}. Then the following conditions are equivalent.

a) σ = DegRevLex

b) For every homogeneous polynomial f ∈ P and every i ∈ {1, …, n} such that LT_{σ}(f) ∈ (x_{i}, …, x_{n}), we have f ∈ (x_{i}, …, x_{n}).

Exercise 1. Let f = x_{1}^{2} + x_{1}x_{2} + x_{2}^{2} ∈ P = K[x_{1}, x_{2}]. Show that there is no monoid ordering σ on 𝕋^{2} such that LT_{σ}(f) = x_{1}x_{2} .

Exercise 2. For each of the following polynomials in ℚ[x_{1}, x_{2}, x_{3}], find a term ordering such that the given representation agrees with the one provided by Remark 1.5.1.

a) f_{1} = x_{1}x_{2}^{3}x_{3} + 2x_{1}x_{2}^{2}x_{3}^{2} − x_{1}^{2}x_{3}^{3}

b) f_{2} = 4x_{1}^{4}x_{2}^{5}x_{3} + 2x_{1}^{3}x_{2}^{2}x_{3} + x_{1}x_{2}^{2}x_{3}^{4}

c) f_{3} = −x_{1}^{2}x_{2}^{4}x_{3} + 3x_{1}x_{2}^{6} − 2x_{1}^{2}x_{2}^{2}

Exercise 3. Do the leading terms of the polynomials f_{1} = x_{1}^{4}x_{2} − x_{3}^{5} , f_{2} = x_{1}^{3}x_{2}^{3} − 1, and f_{3} = x_{1}^{2}x_{2}^{4} − 2x_{3} generate the leading term ideal with respect to DegRevLex of the ideal (f_{1}, f_{2}, f_{3}) in ℚ[x_{1}, x_{2}, x_{3}]?

Exercise 4. Let K be a field. Try to use Macaulay’s Basis Theorem to determine an explicit K -basis of the ring K[x_{1}, x_{2}, x_{3}]/(x_{1} − x_{3}^{3}, x_{2} − x_{3}^{4}). Hint: Use the lexicographic term ordering.

Exercise 5. Let K be a field, let P = K[x_{1}, …, x_{n}], let 1 ≤ m < n, and let V ∈ Mat_{n}(ℤ) be a matrix with det(V) ≠ 0 and of the following type

V = \binom{v}{W}

where v = (0, …, 0, 1, …, 1), the last 0 occurring in the m^{th} position, and where W ∈ Mat_{n−1,n}(ℤ) is such that the first non-zero element in each of the first m columns is positive.

a) Show that the ordering Ord(V) on 𝕋^{n} is a term ordering.

b) Show that if f ∈ P and LT_{Ord(V )}(f) ∈ K[x_{1}, …, x_{m}], then we have f ∈ K[x_{1}, …, x_{m}].

Exercise 6. Let K be a field, and let V ∈ Mat_{n}(ℤ) be a matrix with det(V) ≠ 0 which is of the following type

V = \binom{v}{W}

where v = (0, …, 0, −1) and W ∈ Mat_{n−1,n}(ℤ).

a) Show that the ordering Ord(V) on 𝕋^{n} is not a term ordering.

b) Show that if f ∈ K[x_{1}, …, x_{n}] and x_{n} | LT_{Ord(V )}(f), then x_{n} | f.

c) Can you modify V in such a way that b) holds for homogeneous polynomials, but not in general?

Tutorial 11: Polynomial Representation II

Using Remark 1.5.1, we have another possible way of representing polynomials from the polynomial ring P = K[x_{1}, …, x_{n}] over a field K in a computer program. We choose a term ordering σ on 𝕋^{n}. For each f ∈ P \ {0}, we let

f = ∑_{i=1}^{s} c_{i}t_{i}

with c_{1}, …, c_{s} ∈ K \ {0} and with t_{1}, …, t_{s} ∈ 𝕋^{n} such that t_{1} >_{σ} ⋯ >_{σ} t_{s} be the representation according to Remark 1.5.1. Then we represent f in the computer program by the list of pairs

[[c_{1}, log(t_{1})], …, [c_{s}, log(t_{s})]]

where log(t_{1}), …, log(t_{s}) are considered as vectors in ℤ^{n}.

a) Write a CoCoA program ReprPoly2(…) which takes a polynomial in ℚ[x_{1}, …, x_{n}] and computes this representation.

b) Implement CoCoA functions AddPoly2(…) and MultPoly2(…) which calculate the lists corresponding to the sums and products of two polynomials represented in this way.

c) Check the correctness of your programs by applying them to the polynomials of Tutorial 1.f. Compute the lists representing f_{1} + f_{2} , f_{1} · f_{2} , and f_{2} · f_{3} + f_{1}^{3} again in two ways.

Tutorial 12: Symmetric Polynomials

Let K be a field and f ∈ P = K[x_{1}, …, x_{n}] a polynomial. We call f symmetric if f is invariant under all permutations of the indeterminates x_{1}, …, x_{n}. For i = 1, …, n, the polynomials

s_{i} = ∑_{j_{1}<···<j_{i}} x_{j_{1}} ⋯ x_{j_{i}}

are called the elementary symmetric polynomials. In this tutorial we intend to give an effective proof for the well-known theorem that every symmetric polynomial can be written as a polynomial in s_{1}, …, s_{n}. To this end, we equip the polynomial ring P with the lexicographic term ordering Lex.

a) Show that the symmetric group 𝔖_{n} (i.e. the group of all permutations of the variables x_{1}, …, x_{n}) is generated by the transpositions ⟨x_{1}, x_{2}⟩, …, ⟨x_{1}, x_{n}⟩.

b) Write a CoCoA program Is Symmetric(…) which checks if a given polynomial is symmetric and returns the corresponding Boolean value. (Hint: Show that it suffices to check invariance under a system of generators of 𝔖_{n} and use the CoCoA command Subst(...).) c) Prove the recursive formula s_{i} = s̃_{i} + x_{n}s̃_{i−1} for n > 1 and i ∈ ℤ, where

s̃_{1}, …, s̃_{n−1} are the elementary symmetric polynomials in the indeterminates x_{1}, …, x_{n−1} , where we set s_{i} = s̃_{i} = 0 if i < 0 or i > n, and where s_{0} = s̃_{0} = 1.

d) Use c) to write a CoCoA program ElSym(…) which computes the i^{th} elementary symmetric polynomial in n indeterminates.

e) Prove that the leading term LT_{Lex}(f) = x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} of a symmetric polynomial f ∈ P \ {0} satisfies α_{1} ≥ ⋯ ≥ α_{n}.

f) Show that one can subtract from f a suitable multiple of the polynomial s_{1}^{α_{1}−α_{2}} ⋯ s_{n−1}^{α_{n−1}−α_{n}} · s_{n}^{α_{n}} such that the result is a symmetric polynomial with a smaller leading term with respect to Lex. Consequently, develop an algorithm for representing f as a polynomial in s_{1}, …, s_{n}.

g) Implement the algorithm from f) in a CoCoA function ReprSym(…) which takes a polynomial f ∈ P and returns a polynomial g ∈ P such that f = g(s_{1}, …, s_{n}).

h) Apply Is Symmetric(…) and ReprSym(…) to the following polynomials.

1) F_{1} = x_{1}^{3}x_{2} + x_{2}^{3}x_{3} + x_{1}x_{2}^{3} + x_{1}x_{3}^{3} + x_{1}^{3}x_{3} + x_{2}x_{3}^{3} ∈ ℚ[x_{1}, x_{2}, x_{3}]

2) F_{2} = ∑_{i≠j} x_{i}^{2}x_{j} ∈ ℚ[x_{1}, …, x_{5}]

3) F_{3} = x_{1}^{5} + ⋯ + x_{5}^{5} ∈ ℚ[x_{1}, …, x_{5}]

Tutorial 13: Newton Polytopes

Given a non-zero polynomial f in a polynomial ring P = K[x_{1}, …, x_{n}] over a field K, we may wonder which terms in its support can be the leading term with respect to some term ordering. A partial answer to this question can be given using the Newton polytope of f which is the subject of this tutorial.

For v_{1}, v_{2} ∈ ℝ^{n}, the set {λ_{1}v_{1} + λ_{2}v_{2} | λ_{1}, λ_{2} ∈ ℝ_{≥0}, λ_{1} + λ_{2} = 1} is called the line segment defined by v_{1} and v_{2} and is denoted by [v_{1}v_{2}]. A subset S ⊆ ℝ^{n} is called convex if for all v_{1}, v_{2} ∈ S the line segment [v_{1}v_{2}] is contained in S.

a) Let S ⊆ ℝ^{n} be a non-empty subset. Show that there exists a unique convex subset of ℝ^{n} containing S which is contained in every other convex set containing S. It is called the convex hull of S and denoted by conv(S). Hint: Consider the intersection of all convex sets containing S.

b) Let S ⊆ ℝ^{n} be a convex set, and let v ∈ ℝ^{n} \ S. Prove the equality conv(S ∪ {v}) = {[vw] | w ∈ S}, but also give an example of a set S′ ⊆ ℝ^{n} such that {[vw] | v, w ∈ S′} is not the convex hull of S′. For a finite subset S = {v_{1}, …, v_{r}} of ℝ^{n}, its convex hull P = conv(S)

is also called a polytope. A vertex of P is an element v ∈ P such that v ∉ conv(P \ {v}). The set of all vertices of P is denoted by Vert(P). c) Show that P = {∑_{i=1}^{r} λ_{i}v_{i} | λ_{1}, …, λ_{r} ∈ ℝ_{≥0}, λ_{1} + ⋯ + λ_{r} = 1}.

Hint: Use induction on r, the fact that if we let α = ∑_{i=1}^{r−1} λ_{i}, then ∑_{i=1}^{r} λ_{i}v_{i} = α(∑_{i=1}^{r−1} \frac{λ_{i}}{α} v_{i}) + λ_{r}v_{r}, and apply b).

d) Show that Vert(P) ⊆ S.

e) Prove that the convex hull of Vert(P) is P and that, among all sets whose convex hull is P, it is the unique minimal set with that property. Now let us return to our non-zero polynomial f ∈ P = K[x_{1}, …, x_{n}]. We

let S = {log(t) | t ∈ Supp(f)} and call Newton(f) = conv(S) the Newton polytope of f. Further, we let Vert(f) be the subset of Supp(f) which corresponds to the set of vertices of Newton(f).

f) Prove that if t ∈ Supp(f) \ Vert(f), then there is no monoid ordering σ such that LT_{σ}(f) = t. Hint: Use the fact that if S = {v_{1}, …, v_{r}} ⊆ ℚ^{n}, then every element v of P ∩ ℚ^{n} has a representation v = ∑_{i=1}^{r} λ_{i}v_{i} with λ_{1}, …, λ_{r} ∈ ℚ_{≥0} and λ_{1} +⋯+λ_{r} = 1. (You do not have to prove this.) Now let Vert(f) = {t_{1}, …, t_{s}}. Find a relation log(t) = ∑_{i=1}^{s} λ_{i} log(t_{i}) with λ_{i} ∈ ℚ_{≥0} , and thus a relation t^{a_{0}} = ∏_{i=1}^{s} t_{i}^{a_{i}} with a_{0}, …, a_{s} ∈ ℕ and a_{0} = a_{1}+⋯+a_{s}.

g) Let f = 3x^{6}y^{2} + 2x^{3}y^{3} − xy + 5x^{3}y^{5} ∈ K[x, y]. 1) Find a term ordering σ such that LT_{σ}(f) = x^{6}y^{2} .

2) Find a term ordering σ such that LT_{σ}(f) = x^{3}y^{5} .

3) Show that LT_{σ}(f) ≠ xy for every term ordering σ.

4) Show that LT_{σ}(f) ≠ x^{3}y^{3} for every monoid ordering σ.

1.6 The Division Algorithm

Divide et impera. (Philip of Macedonia)

As we mentioned in Remark 1.5.9, Macaulay’s Basis Theorem is certainly the first step towards being able to compute in residue class modules P^{r}/M, where P = K[x_{1}, …, x_{n}] is a polynomial ring over a field. One gap still to be filled in is the lack of an algorithm which allows us to write a residue class as a linear combination of the residue classes of the terms contained in 𝕋^{n}⟨e_{1}, …, e_{r}⟩ \ LT_{σ}{M}.

Let us have a closer look at what happens for residue class rings of K[x]. In that case any given ideal is principal. Let I ⊆ K[x] be a non-zero ideal and f = a_{d}x^{d} + a_{d−1}x^{d−1} + ⋯ + a_{0} a generator of I such that a_{d} ≠ 0, i.e. such that deg(f) = d. In Section 1.2 we have already mentioned division with remainder for univariate polynomials. By using this device, for any given polynomial g we get a representation g = qf + p, where p is either zero or a polynomial of degree less than d. This implies that every element in the ring K[x]/(f) can be uniquely represented as a linear combination of the residue classes 1, x̄, …, x̄^{d−1} .

Of course this is a special instance of Macaulay’s Basis Theorem. But in the univariate case we have more than that. Namely, the Division Algorithm for univariate polynomials allows us to effectively obtain the desired representation. The topic of the present section is to answer the question as to whether this technique can be extended to the multivariate case. As we shall see, there is no unique way to perform polynomial division in several indeterminates. Instead, the Division Algorithm tells us how much uniqueness we can expect and gives us an explicit way how to go about the computation.

The result of dividing a vector m ∈ P^{r} by a tuple of vectors (g_{1}, …, g_{s}) is a representation of the form m = q_{1}g_{1} + ⋯ + q_{s}g_{s} + p with q_{1}, …, q_{s} ∈ P and p ∈ P^{r} having certain extra properties. The vector p is called the normal remainder of m with respect to (g_{1}, …, g_{s}). It has the drawback of depending both on the chosen module term ordering σ and the order of the elements in the tuple (g_{1}, …, g_{s}). Nevertheless, it will play a major role in Buchberger’s Algorithm for computing Gröbner bases in Section 2.5.

In this section, we let K be a field, n ≥ 1, P = K[x_{1}, …, x_{n}], r ≥ 1, and σ a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩.

Example 1.6.1. In the case K = ℚ, n = r = 1, and P = K[x_{1}] = K[x], let us consider the polynomials f = x^{3} + 2x^{2} + x + 1 and g = 2x + 1. Then we can compute \frac{f}{g} in the following way:

x^{3} + 2x^{2} + x + 1 = g · (\frac{1}{2}x^{2} + \frac{3}{4}x + \frac{1}{8}) remainder \frac{7}{8}
\underline{x^{3} + \frac{1}{2}x^{2}}
\frac{3}{2}x^{2} + x + 1

\underline{\frac{3}{2}x^{2} + \frac{3}{4}x}

\frac{1}{4}x + 1

(\underline{\frac{1}{4}x + \frac{1}{8}}) / (\frac{7}{8})

In other words, we have f = qg + p with q = \frac{1}{2}x^{2} + \frac{3}{4}x + \frac{1}{8} and p = \frac{7}{8} . The characteristic property of p is deg(p) < deg(g).

When we are dealing with polynomials in two indeterminates, we can try to imitate this procedure and proceed as follows.

Example 1.6.2. Let f = x_{1}^{2}x_{2} + x_{1}x_{2}^{2} + x_{2}^{2} , g_{1} = x_{1}x_{2} − 1, and g_{2} = x_{2}^{2} − 1 be three polynomials in ℚ[x_{1}, x_{2}]. We are looking for polynomials q_{1} , q_{2} , and p such that f = q_{1}g_{1} + q_{2}g_{2} + p and deg(p) < 2. With that goal, we eliminate LT_{Lex}(f) step by step as follows:

x_{1}^{2}x_{2} + x_{1}x_{2}^{2} + x_{2}^{2} = \{ \begin{matrix}g_{1} · (x_{1} + x_{2}) \\ g_{2} · (1) \end{matrix} remainder x_{1} + x_{2} + 1

\underline{x_{1}^{2}x_{2} − x_{1}}

x_{1}x_{2}^{2} + x_{1} + x_{2}^{2}
\underline{x_{1}x_{2}^{2} − x_{2}}
x_{1} + x_{2}^{2} + x_{2}
\underline{x_{2}^{2} − 1}
x_{1} + x_{2} + 1

Note that LT_{Lex}(x_{1}+x_{2}^{2}+x_{2}) = x_{1} is not divisible by LT_{Lex}(g_{1}) or LT_{Lex}(g_{2}), so that it has to be added to the remainder. We obtain a representation f = q_{1}g_{1} + q_{2}g_{2} + p such that q_{1} = x_{1} + x_{2} , q_{2} = 1, and p = x_{1} + x_{2} + 1. Again we have deg(p) = 1 < 2 = deg(g_{1}) = deg(g_{2}).

Remark 1.6.3. The result of the procedure described in the previous example depends very much on the order of the elements g_{1}, g_{2} . For instance, if we let g′_{1} = g_{2} and g′_{2} = g_{1} , we get a different result:

x_{1}^{2}x_{2} + x_{1}x_{2}^{2} + x_{2}^{2} = \{ \begin{matrix}g′_{1} · (x_{1} + 1) \\ g′_{2} · (x_{1}) \end{matrix} remainder 2x_{1} + 1

\underline{x_{1}^{2}x_{2} − x_{1}}

x_{1}x_{2}^{2} + x_{1} + x_{2}^{2}
\underline{x_{1}x_{2}^{2} − x_{1}}
2x_{1} + x_{2}^{2}
\underline{x_{2}^{2} − 1}
2x_{1} + 1

In other words, we find a representation f = q′_{1}g′_{1}+q′_{2}g′_{2}+p′ = q′_{2}g_{1}+q′_{1}g_{2}+p′ such that q′_{1} = x_{1} + 1, q′_{2} = x_{1} , and p′ = 2x_{1} + 1.

The procedure described above can be extended to a very general situation. It provides us with the following algorithm. Note that whenever t, t′, t′′ ∈ 𝕋^{n} satisfy t = t′t′′, and for all i ∈ {1, …, r}, we shall commit a slight abuse of notation and write t′′ = \frac{te_{i}}{t′e_{i}} .

Theorem 1.6.4. (The Division Algorithm) Let s ≥ 1, and let m, g_{1}, …, g_{s} ∈ P^{r} \ {0}. Consider the following sequence of instructions.

1) Let q_{1} = ⋯ = q_{s} = 0, p = 0, and v = m.

2) Find the smallest i ∈ {1, …, s} such that LT_{σ}(v) is a multiple of LT_{σ}(g_{i}). If such an i exists, replace q_{i} by q_{i} + \frac{LM_{σ}(v)}{LM_{σ}(g_{i})} and v by

v − \frac{LM_{σ}(v)}{LM_{σ}(g_{i})} · g_{i}.

3) Repeat step 2) until there is no more i ∈ {1, …, s} such that LT_{σ}(v) is a multiple of LT_{σ}(g_{i}). Then replace p by p+LM_{σ}(v) and v by v−LM_{σ}(v).

4) If now v ≠ 0, start again with step 2). If v = 0, return the tuple (q_{1}, …, q_{s}) ∈ P^{s} and the vector p ∈ P^{r}.

This is an algorithm which returns vectors (q_{1}, …, q_{s}) ∈ P^{s} and p ∈ P^{r} such that

m = q_{1}g_{1} + ⋯ + q_{s}g_{s} + p

and such that the following conditions are satisfied.

a) No element of Supp(p) is contained in ⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{s})⟩.

b) If q_{i} ≠ 0 for some i ∈ {1, …, s}, then we have LT_{σ}(q_{i}g_{i}) ≤_{σ} LT_{σ}(m).

c) For all indices i = 1, …, s and all terms t in the support of q_{i}, we have t · LT_{σ}(g_{i}) ∉ ⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{i−1})⟩. Moreover, the vectors (q_{1}, …, q_{s}) ∈ P^{s} and p ∈ P^{r} satisfying the above

conditions are uniquely determined by the tuple (m, g_{1}, …, g_{s}) ∈ (P^{r})^{s+1} .

Proof. First we observe that at each point in the Division Algorithm the equation

m = q_{1}g_{1} + ⋯ + q_{s}g_{s} + p + v

holds, since in step 2) we have q_{i}g_{i} + v = (q_{i} + \frac{LM_{σ}(v)}{LM_{σ}(g_{i})})g_{i} + (v − \frac{LM_{σ}(v)}{LM_{σ}(g_{i})}g_{i}), and in step 3) we have p + v = (p + LM_{σ}(v)) + (v − LM_{σ}(v)).

The algorithm stops after finitely many steps, because both in step 2) and in step 3) the leading term LT_{σ}(v) becomes strictly smaller with respect to σ. By Theorem 1.4.19, this can happen only finitely many times.

When the algorithm stops, we have m = q_{1}g_{1}+⋯+q_{s}g_{s}+p. The vector p satisfies property a), since in step 3) a scalar multiple of a term is added to p only if that term is not a multiple of one of the terms LT_{σ}(g_{1}), …, LT_{σ}(g_{s}).

Now we prove by induction on the number of steps processed that we always have LT_{σ}(v) ≤_{σ} LT_{σ}(m) and LT_{σ}(q_{i}g_{i}) ≤_{σ} LT_{σ}(m) when q_{i} ≠ 0.

This is obviously satisfied at the start of the algorithm. Every time step 2) is executed and the old and new values of q_{i} are not zero, we have the inequalities

LT_{σ} ((q_{i} + \frac{LM_{σ}(v)}{LM_{σ}(g_{i})}) · g_{i}) ≤_{σ} max_{σ}\{LT_{σ}(q_{i}g_{i}), LT_{σ}(v)\} ≤_{σ} LT_{σ}(m).

The same conclusion holds trivially if the old value of q_{i} was zero. Thus condition b) continues to hold throughout the algorithm.

Furthermore, condition c) is always satisfied, since in step 2) only scalar multiples of terms t ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ are added to q_{i} for which t · LT_{σ}(g_{i}) was not eliminated from v during an earlier execution of step 2), i.e. which are not a multiple of one of the terms LT_{σ}(g_{1}), …, LT_{σ}(g_{i−1}).

Finally, we show uniqueness. Suppose there are two representations m = q_{1}g_{1} + ⋯ + q_{s}g_{s} + p = q′_{1}g_{1} + ⋯ + q′_{s}g_{s} + p′ which satisfy conditions a), b), and c). Then we have

0 = (q_{1} − q′_{1})g_{1} + ⋯ + (q_{s} − q′_{s})g_{s} + (p − p′) (∗)

Condition a) implies that LT_{σ}(p − p′) ∉ ⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{s})⟩, and condition c) implies that LT_{σ}((q_{i} − q′_{i})g_{i}) ∉ ⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{i−1})⟩ for all i ∈ {1, …, s} with q_{i} ≠ q′_{i}. Thus the leading terms of the summands in (∗) are pairwise different. In view of Rule 1.5.3.b, this is impossible unless q_{1} − q′_{1} = ⋯ = q_{s} − q′_{s} = p − p′ = 0. □

Remark 1.6.5. Using the Division Algorithm, it is not always possible to decide whether the element m ∈ P^{r} is contained in the submodule ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}. For instance, if n = 2, r = 1, P = ℚ[x_{1}, x_{2}], m = x_{1}x_{2}^{2} − x_{1} , g_{1} = x_{1}x_{2} + 1, and g_{2} = x_{2}^{2} − 1, then we calculate with respect to Lex the following representation:

x_{1}x_{2}^{2} − x_{1} = \{ \begin{matrix}g_{1} · (x_{2}) \\ g_{2} · (0) \end{matrix} remainder − x_{1} − x_{2}

\underline{x_{1}x_{2}^{2} + x_{2}} − x_{1} − x_{2}

Thus we find m = q_{1}g_{1}+q_{2}g_{2}+p with q_{1} = x_{2} , q_{2} = 0, and p = −x_{1}−x_{2} ≠ 0. But, in fact, the element m = x_{1} · g_{2} is in the ideal (g_{1}, g_{2}) ⊆ P.

The Division Algorithm allows us to express the residue class of an element m modulo the submodule generated by {g_{1}, …, g_{s}} as a linear combination of those terms which are not multiples of any term in {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})}. But the set of those terms is in general not the desired basis of P^{r}/M, as the following example shows.

Example 1.6.6. In the situation of Example 1.6.2, the Division Algorithm yields f = (x_{1} + x_{2})g_{1} + g_{2} + (x_{1} + x_{2} + 1). If we use g′_{1} = g_{2} and g′_{2} = g_{1} as in Remark 1.6.3, we get f = x_{1}g_{1} + (x_{1} + 1)g_{2} + (2x_{1} + 1). Therefore we see that x_{1} − x_{2} = (2x_{1} + 1) − (x_{1} + x_{2} + 1) is an element of the ideal (g_{1}, g_{2}), i.e. that x_{1} and x_{2} have the same residue class in P/(g_{1}, g_{2}).

But neither x_{1} nor x_{2} are multiples of any term in {LT_{σ}(g_{1}), LT_{σ}(g_{2})}. Thus we cannot use 𝕋^{2} \ (LT_{σ}(g_{1}), LT_{σ}(g_{2})) as a set of representatives of a K -basis of P/(g_{1}, g_{2}).

We conclude this section with a definition which will be of fundamental importance when we discuss Buchberger’s Algorithm (see Section 2.5).

Definition 1.6.7. Let s ≥ 1, let m, g_{1}, …, g_{s} ∈ P^{r} \ {0}, and let G be the tuple (g_{1}, …, g_{s}). We apply the Division Algorithm and obtain a representation m = q_{1}g_{1} + ⋯ + q_{s}g_{s} + p with q_{1}, …, q_{s} ∈ P and p ∈ P^{r}. Then the vector p is called the normal remainder of m with respect to G and is denoted by NR_{σ,G}(m), or simply by NR_{G}(m) if no confusion can arise. For m = 0, we let NR_{G}(m) = 0.

In other publications, the normal remainder of a vector is sometimes also called its normal form with respect to G. However, we shall reserve the latter notion for a more special situation (see Section 2.4).

Exercise 1. Let n = 2, let P = K[x, y], and let σ = DegRevLex. Apply the Division Algorithm to divide f by (g_{1}, g_{2}) in the following cases.

a) f = x^{2} + y^{2} , g_{1} = xy − 1, g_{2} = x^{2} − xy

b) f = x^{7} − 1, g_{1} = x^{2} − y, g_{2} = y^{2} − x

c) f = x^{3}y^{3} − x^{3} − y^{3} , g_{1} = xy^{2} − x^{2} , g_{2} = x^{2}y − y^{2}

Exercise 2. Let P = K[x_{1}, …, x_{n}], let σ be a term ordering on 𝕋^{n}, let g ∈ P^{r} \ {0}, and let M = ⟨g⟩ be the cyclic submodule of P^{r} generated by g.

a) Prove that LT_{σ}(M) = ⟨LT_{σ}(g)⟩.

b) Show that the residue classes of the terms contained in the set 𝕋^{n}⟨e_{1}, …, e_{r}⟩ \ {t · LT_{σ}(g) | t ∈ 𝕋^{n}} form a K -basis of P^{r}/M.

c) Conclude that dim_{K}(P^{r}/M) = ∞ if r > 1.

d) Show that, for every m ∈ P^{r}, the Division Algorithm yields the unique representation of the residue class of m modulo M in terms of the basis in b).

Exercise 3. Let f, g_{1}, g_{2} ∈ P = K[x_{1}, x_{2}] be polynomials such that g_{1} ∈ K[x_{1}] and g_{2} ∈ K[x_{2}]. Then show that NR_{(g_{1},g_{2})}(f) = NR_{(g_{2},g_{1})}(f).

Exercise 4. Give an example of four polynomials f, g_{1}, g_{2}, g_{3} ∈ ℚ[x, y, z] and a term ordering σ such that the normal remainder of f with respect to G = (g_{1}, g_{2}, g_{3}) never has a degree < deg(f), no matter how G is ordered.

Exercise 5. Let f = y^{2}z^{2} − x^{3} − x, g_{1} = y^{3} − x^{2} − 1, and g_{2} = xy − z^{2} be polynomials in ℚ[x, y, z], and let G = (g_{1}, g_{2}). Give an example of a term ordering σ on 𝕋^{3} such that NR_{σ,G}(f) = 0 and an example of a term ordering τ on 𝕋^{3} such that NR_{τ,G}(f) ≠ 0.

Tutorial 14: Implementation of the Division Algorithm

In this tutorial we consider several possibilities to implement versions of the Division Algorithm. As above, let K be a field, let n ≥ 1, let P = K[x_{1}, …, x_{n}], let r ≥ 1, let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, let s ≥ 1, and let g_{1}, …, g_{s} ∈ P^{r} \ {0}.

a) Program a CoCoA function Division(…) which takes a non-zero vector m ∈ P^{r} and a list of non-zero vectors G = [g_{1}, …, g_{s}], performs the Division Algorithm, and computes a list [[q_{1}, …, q_{s}], p] corresponding to the representation m = q_{1}g_{1} + ⋯ + q_{s}g_{s} + p and having properties a), b), and c) of Theorem 1.6.4. Hint: For implementing step 2), you may want to use the CoCoA functions LPP(...) and LPos(...).

b) In the following cases, use Division(…) to compute representations as above. In all cases, use both PosLex and DegRevLexPos. Check your answers by applying the built-in CoCoA function DivAlg(…).

1) n = 3, r = 2, m = (x_{1}^{2} + x_{2}^{2} + x_{3}^{2}, x_{1}x_{2}x_{3}), g_{1} = (x_{1}, x_{2}), g_{2} = (x_{2}, x_{3}), g_{3} = (x_{3}, x_{1})

2) n = r = 4, m = (x_{1}^{4}, x_{2}^{4}, x_{3}^{4}, x_{4}^{4}), g_{1} = (x_{1} + 1, 0, 0, 0), g_{2} = (0, x_{2} + 1, 0, 0), g_{3} = (0, 0, x_{3} + 1, 0), g_{4} = (0, 0, 0, x_{4} + 1)

3) n = 2, r = 5, m = (x_{1}^{4}, x_{1}^{3}x_{2}, x_{1}^{2}x_{2}^{2}, x_{1}x_{2}^{3}, x_{2}^{4}), g_{1} = (x_{1}^{4}, x_{1}^{3}, x_{1}^{2}, x_{1}, 1),

g_{2} = (1, x_{2}, x_{2}^{2}, x_{2}^{3}, x_{2}^{4})

c) Given m, g_{1}, …, g_{s} ∈ P^{r} \ {0}, consider the following sequence of instructions.

1) Let i = 1 and q_{1} = ⋯ = q_{s} = 0.

2) Find the largest term t ∈ Supp(m) which is of the form t = t′ LT_{σ}(g_{i}) for some t′ ∈ 𝕋^{n}. If there exists such a term, let c ∈ K \ {0} be its coefficient in m, replace m by m − \frac{c}{LC_{σ}(g_{i})} t′ g_{i}, and add \frac{c}{LC_{σ}(g_{i})} t′ to q_{i}.

3) Repeat step 2) as often as possible. When finally the intersection Supp(m) ∩ (LT_{σ}(g_{i})) is empty, increase i by one.

4) If i ≤ s, continue with step 2). Otherwise set p = m and return the list [q_{1}, …, q_{s}, p].

Show that this is an algorithm, i.e. that it stops after finitely many steps, and that it returns a list [[q_{1}, …, q_{s}], p] such that q_{1}, …, q_{s} ∈ P, p ∈ P^{r}, and m = q_{1}g_{1} + ⋯ + q_{s}g_{s} + p.

d) Give an example in which the representation calculated in c) does not have the properties required in Theorem 1.6.4.

e) Show that, if one repeats the algorithm of c) often enough (i.e. if one applies it to the element p instead of m, etc.), the representations of m one gets become eventually stable. Give an example in which this stable representation still does not agree with the representation calculated by the Division Algorithm. f) Implement the algorithm of c) and the procedure described in e) in a

CoCoA function Division2(…) and compare its efficiency with the function Division(…) by applying it to the test cases of b).

Tutorial 15: Normal Remainders

If we are only interested in the normal remainder of an element m ∈ P^{r} with respect to a tuple of vectors G, we can use a simplified version of the Division Algorithm which we want to examine in this tutorial.

Let K be a field, P = K[x_{1}, …, x_{n}] a polynomial ring over K, σ a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, and G = (g_{1}, …, g_{s}) ∈ (P^{r})^{s}. To each vector m ∈ P^{r}, we can apply the Normal Remainder Algorithm.

1) Choose the largest term t ∈ Supp(m) with respect to σ which is divisible by one of the leading terms LT_{σ}(g_{1}), …, LT_{σ}(g_{s}). If no such term exists, return m and stop.

2) Find the minimal i ∈ {1, …, s} such that LT_{σ}(g_{i}) divides t and write t = t′ LT_{σ}(g_{i}) with t′ ∈ 𝕋^{n}.

3) Let c ∈ K \\{0\} be the coefficient of t in m. Replace m by m− \frac{ct′}{LC_{σ}(g_{i})}g_{i} and continue with step 1). As we shall see, for the purposes of Section 2.5, it will suffice to implement

and use this algorithm.

a) Prove that the Normal Remainder Algorithm is an algorithm, i.e. that it stops after finitely many steps. Then compare it to the Division Algorithm and show that it returns NR_{G}(m).

b) Write a CoCoA program NormalRemainder(…) which computes the normal remainder of an element m ∈ P^{r} with respect to the list of vectors G using the above algorithm. Do not use the built-in function NR(…) of CoCoA.

c) Apply the program NormalRemainder(…) in the following cases, where K = ℚ and σ = PosLex.

1) m = x_{1}^{4}x_{2} + x_{2}^{4}x_{3} + x_{3}^{4}x_{1} ∈ ℚ[x_{1}, x_{2}, x_{3}], g_{1} = x_{1}^{2}x_{2} , g_{2} = x_{2}^{2}x_{3} , g_{3} = x_{3}^{2}x_{1}

2) m = (x_{1}^{3} + 1, x_{2}^{3} + 1, x_{3}^{3} + 1) ∈ ℚ[x_{1}, x_{2}, x_{3}]^{3} , g_{1} = (x_{1}, x_{2}, x_{3}), g_{2} = (0, x_{2}, x_{1})

3) m = (x_{1}x_{2} + x_{3}x_{4}, x_{1}x_{2}x_{3}x_{4}) ∈ ℚ[x_{1}, x_{2}, x_{3}, x_{4}]^{2} , g_{1} = (x_{1}, 0), g_{2} =

(x_{2}, 0), g_{3} = (0, x_{3}), g_{4} = (0, x_{4})

d) Give an example which shows that the normal remainder of an element m ∈ P^{r} depends on the ordering of the elements in G = (g_{1}, …, g_{s}).

e) Give an example of an element m ∈ ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r} such that NR_{G}(m) ≠ 0. Show that if an element m ∈ P^{r} does satisfy NR_{G}(m) = 0, then it is contained in the submodule ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}.

1.7 Gradings

The writer saw that some mathematicians call this lemma “Nakayama’s lemma”

and therefore the writer asked Nakayama, [...] what would be the best name for this lemma? Then, Nakayama kindly answered the writer

that the name of Krull-Azumaya [...] would be the best name for the lemma.

(Masayoshi Nagata)

This section serves as a link between the first chapter and the subsequent ones. The point is that, in view of Macaulay’s Basis Theorem, we would like to effectively compute both a basis of a quotient module P^{r}/M and the representation of every residue class in terms of such a basis. The first attempt to do that was made in the previous section where we studied the Division Algorithm. We found that in the multivariate case it is a first step, but it does not solve the problem completely. How can we go on?

As happens many times in mathematics, new tools are needed. In particular, it will turn out to be important to have general notions of graded rings and modules available. So, in this section we introduce and study quite general kinds of gradings, namely rings graded over monoids and modules graded over monomodules. Two main results are that we characterize homogeneous ideals and graded submodules by the property that they have homogeneous sets of generators (see Proposition 1.7.10) and that it is possible to represent homogeneous elements in terms of those generators using homogeneous coefficients of complementary degree (see Corollary 1.7.11).

In the last part of the section, we prove two useful results about rings graded over monoids carrying a monoid ordering. We characterize homogeneous prime ideals (see Proposition 1.7.12), and we prove a graded version of Nakayama’s Lemma (see Proposition 1.7.15). Not all results in this section are given in their greatest generality, but they will be general enough for our later applications.

Recall that in this book all monoids and rings are assumed to be commutative. Throughout this section, let R be a ring and M an R-module.

Definition 1.7.1. Let (Γ, +) be a monoid.

a) The ring R is called a Γ -graded ring (or a (R, Γ)-graded ring, or graded over Γ) if there exists a family of additive subgroups {R_{γ}}_{γ∈Γ} such that

1) R = ⊕_{γ∈Γ} R_{γ},

2) R_{γ} · R_{γ′} ⊆ R_{γ+γ′} for all γ, γ′ ∈ Γ.

b) The elements of R_{γ} are called homogeneous of degree γ. For r ∈ R_{γ} we write deg(r) = γ. c) If r ∈ R and r = ∑_{γ∈Γ} r_{γ} is the decomposition of r according to a.1),

where r_{γ} ∈ R_{γ}, then r_{γ} is called the homogeneous component of degree γ of r.

If R is a Γ -graded ring, then 0 is a homogeneous element of R of every degree. Moreover, the decomposition of every element into its homogeneous components is unique, since in Definition 1.7.1.a we have a direct sum. If the cancellation law holds in Γ, then the set R_{0} is a subring of R, and for every γ ∈ Γ the set R_{γ} is an R_{0} -module.

The following two examples constitute the most important situations in which we shall meet Γ -graded rings.

Example 1.7.2. Let S be a ring, let n ≥ 1, and let P = S[x_{1}, …, x_{n}] be a polynomial ring over S. If we let

P_{d} = {f ∈ P | deg(t) = d for all t ∈ Supp(f)}

for d ≥ 0, we make P into an ℕ-graded ring. This grading is called the standard grading of P. It satisfies deg(x_{1}) = ⋯ = deg(x_{n}) = 1. For d ≥ 0, the elements of P_{d} are called homogeneous polynomials (or forms) of degree d.

Example 1.7.3. Let S be a ring, let n ≥ 1, and let P = S[x_{1}, …, x_{n}] be a polynomial ring over S. For each (α_{1}, …, α_{n}) ∈ ℕ^{n}, we let P_{(α_{1},...,α_{n})} = S · x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}. It is clear that in this way P = ⊕_{(α_{1},...,α_{n})∈ℕ^{n}}P_{(α_{1},...,α_{n})} becomes an ℕ^{n} -graded ring. We can also view P as a ℤ^{n} -graded ring if we define P_{(α_{1},...,α_{n})} = 0 for every (α_{1}, …, α_{n}) ∈ ℤ^{n} such that α_{i} < 0 for some i ∈ {1, …, n}.

A natural way to extend Definition 1.7.1 to cover R-modules would be to use the monoid Γ again as the set of possible degrees. As we shall see in Section 2.3, this is not sufficiently general, so that we have to resort to the following notion.

Definition 1.7.4. Let (Γ, +) be a monoid, let R be a Γ -graded ring, let (Σ, ∗) be a Γ -monomodule, and let M be an R-module. We say that M is a Σ -graded R-module (or a Σ -graded (R, Γ)-module, or simply a graded R-module if Σ = Γ) if there exists a family of subgroups {M_{s}}_{s∈Σ} such that

1) M = ⊕_{s∈Σ}M_{s},

2) R_{γ} · M_{s} ⊆ M_{γ∗s} for all γ ∈ Γ and all s ∈ Σ.

For the remainder of this section, we let (Γ, +) be a monoid in which the cancellation law holds, R a Γ -graded ring, (Σ, ∗) a Γ -monomodule, and M a Σ -graded R-module. Then the set M_{s} is an R_{0} -module for every s ∈ Σ. Let us have a look at the quintessential example of a Σ -graded R-module.

Example 1.7.5. Let S be a ring, let n ≥ 1, and let P = S[x_{1}, …, x_{n}] be a polynomial ring over S equipped with the ℕ^{n} -grading defined in Example 1.7.3. Via the isomorphism log : 𝕋^{n} ⟶ ℕ^{n}, we shall view this as a 𝕋^{n} -grading. For r ≥ 1, the set of terms 𝕋^{n}⟨e_{1}, …, e_{r}⟩ of the P -module P^{r} is a 𝕋^{n} -monomodule. Now we let (P^{r})_{te_{i}} = Ste_{i} for t ∈ 𝕋^{n} and 1 ≤ i ≤ r, i.e. for te_{i} ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩. It is easy to check that this makes P^{r} into a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded P -module.

Given a Σ -graded R-module, there exists a cheap way of making more Σ -graded R-modules called shifting degrees. Modules obtained by shifting degrees in R itself are the basic building blocks in the construction of graded free resolutions in Volume 2.

Definition 1.7.6. Let γ ∈ Γ be a fixed element such that the multiplication map μ_{γ} : Σ ⟶ Σ defined by s ↦ γ ∗ s is injective. For instance, if the leftcancellation law holds in Σ, this assumption is satisfied for all γ ∈ Γ.

a) For every s ∈ Σ, we define M(γ)_{s} = M_{γ∗s}. Then we let M(γ) = ⊕_{s∈Σ}M(γ)_{s}. It is easy to check that in this way we get a Σ -graded R-module M(γ). We call it the module obtained by shifting degrees by γ. If the map μ_{γ} : Σ ⟶ Σ is bijective, the set underlying M(γ) agrees with M.

b) Modules of the form ⊕_{i∈I}R(γ_{i}), where I is a set and γ_{i} ∈ Γ for all i ∈ I, will be called Γ -graded free R-modules. Here we let (⊕_{i∈I}R(γ_{i}))_{γ} = ⊕_{i∈I}R(γ_{i})_{γ} for all γ ∈ Γ.

Having defined Γ -graded rings and Σ -graded R-modules, we also need the appropriate sets of homomorphisms between those objects.

Definition 1.7.7. Let S be another ring which is graded over a monoid (Γ′, +), and let N be another Σ -graded R-module.

a) For a ring homomorphism φ : R → S and a homomorphism of monoids ψ : Γ → Γ′, we call (φ, ψ) (or simply φ) a homomorphism of graded rings if φ(R_{γ}) ⊆ S_{ψ(γ)} for every γ ∈ Γ.

b) An R-linear map λ : M → N is called a homomorphism of Σ -graded R-modules or a homogeneous R-linear map if λ(M_{s}) ⊆ N_{s} for all s ∈ Σ.

For instance, let γ ∈ Γ be an invertible element, and let r ∈ R_{γ}. Then the R-linear map μ_{r} : R(−γ) → R defined by r′ ↦ rr′ is a homomorphism of graded R-modules.

Next we want to introduce the “correct” kind of subobjects of graded rings and modules. Note that if we equip P = K[x] with the standard grading and let I = (x − 1) ⊆ P, then it is clear that I ∩ P_{d} = (0) for every d ∈ ℕ. Somehow this suggests that I does not “inherit” the grading of P. In other words, what we really need is that the canonical injective map I ⟶ P is a homomorphism of graded R-modules. Spelling this out in concrete terms, we arrive at the following definition.

Definition 1.7.8. An R-submodule N of the Σ -graded R-module M is called a Σ -graded R-submodule of M if we have N = ⊕_{s∈Σ}(N ∩ M_{s}).

A Γ -graded submodule of R is also called a Γ -homogeneous ideal of R, or simply a homogeneous ideal of R if Γ is clear from the context.

Remark 1.7.9. Let N ⊆ M be a Σ -graded R-submodule. We can equip the residue class module M/N with the structure of a Σ -graded R-module by defining (M/N)_{s} = M_{s}/N_{s} for every s ∈ Σ. Thus the canonical homomorphism M ⟶ M/N becomes a homomorphism of Σ -graded R-modules. In particular, the residue class ring R/I of R by a homogeneous ideal is again a Γ -graded ring.

For practical purposes, the following proposition and its corollary are most useful. They allow us to quickly prove that some submodule is Σ -graded by exhibiting a homogeneous system of generators, and to use this fact to get “nice” representations of arbitrary homogeneous elements in terms of those homogeneous generators.

Proposition 1.7.10. Let N ⊆ M be an R-submodule, and let N_{s} = N ∩M_{s} for all s ∈ Σ. Then the following conditions are equivalent.

a) N = ⊕_{s∈Σ}N_{s}

b) If n ∈ N and n = ∑_{s∈Σ} n_{s} is the decomposition of n into its homogeneous components, then n_{s} ∈ N for all s ∈ Σ.

c) There is a system of generators of N which consists of homogeneous elements.

Proof. First we show a) ⇒ b). Choose an element n ∈ N and let n = ∑_{s∈Σ} n_{s} be its decomposition according to a), where n_{s} ∈ N_{s} for all s ∈ Σ. Since n_{s} ∈ N_{s} ⊆ M_{s} and M = ⊕_{s∈Σ}M_{s}, this is also the decomposition of n into its homogeneous components in M. Thus the homogeneous components of n lie in N.

Implication b) ⇒ c) follows by taking all homogeneous components of a system of generators of N. Now we show c) ⇒ a). Let {n_{β} | β ∈ B} be a homogeneous system of generators of N and let n ∈ N. We write n = ∑_{β∈B} r_{β}n_{β} with elements r_{β} ∈ R. For each β ∈ B we decompose r_{β} = ∑_{γ∈Γ} r_{β,γ} into its homogeneous components. Then

n = ∑_{β∈B} ∑_{γ∈Γ} r_{β,γ}n_{β} = ∑_{s∈Σ} ( ∑_{{(β,γ) | γ∗deg(n_{β})=s}} r_{β,γ}n_{β}) ∈ ∑_{s∈Σ} N_{s}

shows N = ∑_{s∈Σ} N_{s}, and from M = ⊕_{s∈Σ}M_{s} we get that this sum is direct. □

Corollary 1.7.11. Suppose that the right-cancellation law holds in Σ. Let N ⊆ M be a Σ -graded R-submodule, let {n_{β} | β ∈ B} be a set of homogeneous generators of N, and let s ∈ Σ. Every element n ∈ N_{s} has a representation n = ∑_{β∈B} r_{β}n_{β} with homogeneous elements r_{β} ∈ R such that deg(r_{β}) ∗ deg(n_{β}) = s for every β ∈ B.

Proof. Let n = ∑_{β∈B} a_{β}n_{β} with a_{β} ∈ R for β ∈ B. We decompose a_{β} as the sum of its homogeneous components and group them by writing a_{β} = a′_{β} + a′′_{β}, where a′_{β} is the unique homogeneous component of a_{β} such that deg(a′_{β}) ∗ deg(n_{β}) = s. We get n = ∑_{β∈B} a′_{β}n_{β} + ∑_{β∈B} a′′_{β}n_{β}. Equivalently, we have 0 = (∑_{β∈B} a′_{β}n_{β} − n) + ∑_{β∈B} a′′_{β}n_{β}. By construction, the element ∑_{β∈B} a′_{β}n_{β} − n is a homogeneous component of this sum, i.e. it has to be zero. □

In the preceding proof we used the assumption that the right-cancellation law holds in Σ in order to have a′_{β} uniquely singled out by the relation deg(a′_{β}) ∗ deg(n_{β}) = s. We leave the generalization to the reader (see Exercise 9).

For the remainder of this section, we shall assume that we are also given a monoid ordering τ on Γ. By Remark 1.4.2.b, this implies that the monoid Γ is infinite. We can characterize homogeneous prime ideals by the usual property applied to homogeneous elements only.

Proposition 1.7.12. Let 𝔭 be a homogeneous proper ideal in R. Then the following conditions are equivalent.

a) The ideal 𝔭 is a prime ideal.

b) If fg ∈ 𝔭 for homogeneous elements f, g ∈ R, then f ∈ 𝔭 or g ∈ 𝔭.

Proof. It suffices to show that b) implies a). Let f, g ∈ R be two elements such that fg ∈ 𝔭. We decompose them into their homogeneous components. If we allow some components to be zero, we may assume that the two sets of degrees are identical, i.e. that we have f = f_{γ_{1}} + ⋯ + f_{γ_{s}} and g = g_{γ_{1}} + ⋯ + g_{γ_{s}}, where γ_{1} <_{τ} ⋯ <_{τ} γ_{s}. For a contradiction, we assume that the numbers i = min{k ∈ ℕ | f_{γ_{k}} ∉ 𝔭} and j = min{k ∈ ℕ | g_{γ_{k}} ∉ 𝔭} exist. Now we look at the homogeneous component of degree γ_{i} + γ_{j} of fg. It is given by the formula

f_{γ_{i}}g_{γ_{j}} + ∑_{{(k,l)|γ_{k}+γ_{l}=γ_{i}+γ_{j}}} f_{γ_{k}}g_{γ_{l}}

Since γ_{k} <_{τ} γ_{i} or γ_{l} <_{τ} γ_{j} for every summand above, we have k < i or l < j, and therefore f_{γ_{k}}g_{γ_{l}} ∈ 𝔭. Hence also f_{γ_{i}}g_{γ_{j}} belongs to 𝔭, and the hypothesis implies f_{γ_{i}} ∈ 𝔭 or g_{γ_{j}} ∈ 𝔭, a contradiction. □

Although neither of the two equivalent conditions in the previous proposition contains any reference to τ, the existence of such a monoid ordering is instrumental for the claim to hold, as our next example shows.

Example 1.7.13. Let R = ℤ[i] be the ring of Gaußian numbers (see Tutorial 4), i.e. the ℤ-subalgebra of ℂ generated by {i}. If we use the group Γ = ℤ/(2), we see that R is a Γ -graded ring with R_{0} = ℤ and R_{1} = ℤi. Let us consider the ideal I = (2) in R. It is not a prime ideal, since (1 − i)(1 + i) = 2 and neither 1 − i nor 1 + i is in I. However, if f, g ∈ R are homogeneous elements such that fg ∈ I, then f ∈ I or g ∈ I. This follows, because either f, g ∈ R_{0} or f, g ∈ R_{1} , and in both cases the fact that 2 is a prime number shows the claim.

Our last goal in this section is to prove a version of Nakayama’s famous lemma adapted to graded modules. First, we need the following result.

Lemma 1.7.14. If τ is a term ordering on Γ, then R_{+} = ⊕_{γ>_{τ} 0}R_{γ} is a homogeneous ideal of R.

Proof. It suffices to show R · R_{+} ⊆ R_{+} . This follows from the fact that every element is a finite sum of homogeneous elements, and for homogeneous elements f ∈ R_{γ}, g ∈ R_{γ′} with γ, γ′ ∈ Γ and γ′ >_{τ} 0 we have fg ∈ R_{γ+γ′} with γ + γ′ >_{τ} γ ≥_{τ} 0 by Definition 1.4.1. □

Proposition 1.7.15. (Graded Version of Nakayama’s Lemma) Let τ be a term ordering on Γ and σ a well-ordering on Σ which is compatible with τ. Suppose that the right-cancellation law holds in Σ. Let M_{1}, M_{2} be two Σ -graded R-submodules of M such that M_{1} ⊆ M_{2} ⊆ M_{1} + R_{+} · M_{2} . Then M_{1} = M_{2} .

Proof. It suffices to show M_{2} ⊆ M_{1} . Suppose that this is not the case. By Proposition 1.4.18, there exists a homogeneous element m ∈ M_{2} \ M_{1} of minimum degree with respect to σ. Using the hypothesis and Corollary 1.7.11, we see that there exist homogeneous elements m′ ∈ M_{1} , g_{1}, …, g_{s} ∈ M_{2} , and f_{1}, …, f_{s} ∈ R_{+} such that m = m′ + ∑_{i=1}^{s} f_{i}g_{i} and such that deg(f_{i}) ∗ deg(g_{i}) = deg(m) for i = 1, …, s. Since deg(f_{i}) >_{τ} 0 for i = 1, …, s, the degrees of the elements g_{1}, …, g_{s} are less than the degree of m. The choice of m then implies g_{1}, …, g_{s} ∈ M_{1} . Consequently, we get m ∈ M_{1} , a contradiction. □

Corollary 1.7.16. Let τ be a term ordering on Γ and σ a well-ordering on Σ which is compatible with τ. Suppose that the right-cancellation law holds in Σ.

a) A set of homogeneous elements m_{1}, …, m_{s} ∈ M generates the R-mod-ule M if and only if their residue classes \overline{m}_{1}, …, \overline{m}_{s} in M/(R_{+} · M) generate this residue class module.

b) If R_{0} is a field, every homogeneous system of generators of M contains a minimal one.

Proof. To prove a), it suffices to show the implication “⇐”. Let N be the graded submodule of M generated by {m_{1}, …, m_{s}}. By assumption we have M ⊆ N + R_{+} · M. Therefore Nakayama’s Lemma yields M = N.

The proof of b) follows from a), from R/R_{+} ≅ R_{0} , and from the fact that every system of generators of the R_{0} -module M/(R_{+} · M) contains a basis. □

Exercise 1. Let Γ be a monoid in which the cancellation law holds, and let R be a Γ -graded ring. Prove that 1 ∈ R_{0} . Hint: Write 1 = ∑_{γ∈Γ} r_{γ} and show that r_{0} = 1.

Exercise 2. Let Γ = {0, ∞} be the monoid defined in Exercise 2 of Section 1.3, and let R be a ring.

a) Define deg(r) = ∞ for all r ∈ R. Show that this makes R into a Γ - graded ring in which the element 1 is homogeneous of some non-zero degree.

b) Equip S = R ⊕ R with componentwise addition and multiplication, and let S_{0} = R⊕0 as well as S_{∞} = 0⊕R. Show that this makes S into a Γ -graded ring in which the element 1 = (1, 1) is not homogeneous.

Exercise 3. Let R be a ring, let P = R[x_{1}, …, x_{n}], and let r ≥ 1. Check that the definition P_{t} = R · t for t ∈ 𝕋^{n} makes P into a 𝕋^{n} -graded ring, and that P^{r} together with the grading defined in Example 1.7.5 is a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded P -module.

Exercise 4. Let K be a field, let R = K[x], let Γ = ℕ, and let R_{γ} = {c(x − 1)^{γ} | c ∈ K} for all γ ∈ Γ .

a) Show that R is a Γ -graded ring.

b) Prove that I = (x) is not a homogeneous ideal of R.

c) Give an example of a homogeneous ideal of R.

Exercise 5. Check that the set M(γ) = ⊕_{s∈Σ}M(γ)_{s}, as introduced in Definition 1.7.6, is indeed a Σ -graded R-module. Then consider an element r ∈ R_{γ} and the map M ⟶ M(γ) defined by m ↦ rm, and show that it is a homomorphism of Σ -graded R-modules.

Exercise 6. Let K be a field, let R = K[x_{1}, x_{2}], let Γ = ℕ^{2} , and let R_{(α_{1},α_{2})} = {cx_{1}^{α_{1}}x_{2}^{α_{2}} | c ∈ K} for (α_{1}, α_{2}) ∈ ℕ^{2} as in Example 1.7.3. Furthermore, let Γ′ = ℕ and let R_{γ′} be the K-vector space generated by {x_{1}^{α_{1}}x_{2}^{α_{2}} | α_{1} + α_{2} = γ′} for γ′ ∈ Γ′. In this way, R becomes both a Γ - and a Γ′ -graded ring. Finally, let φ : R → R be the identity map and ψ : Γ → Γ′ the map defined by ψ((α_{1}, α_{2})) = α_{1} + α_{2} . Show that (φ, ψ) is a homomorphism of graded rings.

Exercise 7. Let R be a Γ -graded ring and S ⊆ R a subring. Discuss whether and how one can equip S with a Γ -grading in such a way that the inclusion S ↪ R becomes a homomorphism of graded rings.

Exercise 8. Let Γ be a monoid in which the cancellation law holds. A Γ -graded ring R = ⊕_{γ∈Γ} R_{γ} is called a Γ -graded field if every homogeneous element of R \ {0} is a unit. Let R be a Γ -graded field.

a) Prove that R_{0} is a field, and that for every γ ∈ Γ the R_{0} -vector space R_{γ} has dimension ≤ 1. (Hint: Use Exercise 1.)

b) Give an example of a Γ -graded field which is not a field. (Hint: Consider the ring K[x, x^{−1}].)

c) Show that {γ ∈ Γ | R_{γ} ≠ 0} is a group.

d) Let M be a finitely generated Γ -graded R-module. Prove that M has an R-basis consisting of homogeneous elements. (Hint: Start with a minimal homogeneous system of generators and show that it is a basis.)

Exercise 9. Modify the statement of Corollary 1.7.11 to generalize it to the case of a monomodule Σ in which the right-cancellation law does not necessarily hold.

Exercise 10. Give an example of a ring R graded over a monoid (Γ, +) such that there exists a monoid order σ on Γ , but R_{+} = ⊕_{γ>_{σ}0}R_{γ} is not an ideal of R.

Tutorial 16: Homogeneous Polynomials

Recall that the standard grading on the polynomial ring P = K[x_{1}, …, x_{n}] over a field K was defined by P_{d} = {f ∈ P | deg(t) = d for all t ∈ Supp(f)} for d ∈ ℕ in Example 1.7.2, and that the elements of P_{d} are called homogeneous polynomials of degree d.

In this tutorial we want to get a better understanding of the space P_{d} of homogeneous polynomials of degree d. We want to know its dimension and to characterize its elements.

a) Show that P_{d} is a K -vector space of dimension \binom{n+d−1}{d} for all d ∈ ℕ.

b) Find and prove a formula which computes the dimension of the quotient vector space of P_{d}/V , where V is the subspace of polynomials which are divisible by x_{1} .

c) Let K be an infinite field. Suppose that f ∈ P satisfies f(a_{1}, …, a_{n}) = 0 for every (a_{1}, …, a_{n}) ∈ K^{n}. Then show that f = 0.

d) Produce an example which shows that the above statement is false if K is finite.

e) Prove that if f ∈ P is a non-zero homogeneous polynomial of degree d, then f(λa_{1}, …, λa_{n}) = λ^{d} · f(a_{1}, …, a_{n}) holds for all λ ∈ K and all (a_{1}, …, a_{n}) ∈ K^{n}.

f) Prove that the converse of e) holds if K has at least max{deg(f), d} + 1 elements. Now consider the following non-standard grading on P = K[x_{1}, x_{2}]. We

declare x_{1} to be homogeneous of degree 2 and x_{2} to be homogeneous of degree 1. Then we let P_{d} = {f ∈ P | 2α_{1} + α_{2} = d for all x_{1}^{α_{1}}x_{2}^{α_{2}} ∈ Supp(f)} ∪ {0} for all d ∈ ℕ.

g) Prove this definition makes P into a ℕ-graded ring.

h) Explicitly describe the function from ℕ to ℕ which maps d to dim_{K}(P_{d}), i.e. find a formula for dim_{K}(P_{d}).

i) Modify e) above to fit this case.

2. Gröbner Bases

A threat is stronger than its execution. (Aaron Nimzowitch)

Towards the end of Chapter 1 we encountered Macaulay’s Basis Theorem. It says that, given a polynomial ring P = K[x_{1}, …, x_{n}] over a field K and a P -submodule M of P^{r}, one can attack the problem of computing a K -basis of the quotient module P^{r}/M if one knows LT_{σ}(M) for some term ordering σ. But we saw that the leading terms of a set of generators of M do not necessarily generate LT_{σ}(M).

Thus the opening sections of this chapter are variations on the theme that not all systems of generators of a module are equal. Some are more special than others. In Section 2.1 we find that the leading terms of a system of nonzero generators {g_{1}, …, g_{s}} of M generate LT_{σ}(M) if and only if it is special in the following sense: for every m ∈ M \ {0} there exists a representation m = ∑_{i=1}^{s} f_{i}g_{i} with f_{1}, …, f_{s} ∈ P such that LT_{σ}(m) ≥_{σ} LT_{σ}(f_{i}g_{i}) for all i = 1, …, s such that f_{i} ≠ 0.

Then we change our strategy and attack systems of generators from another side. Given a term ordering σ on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, every element g ∈ P^{r} \ {0} can be split as g = LM_{σ}(g) − g′. By looking at this equation modulo ⟨g⟩, we can view g as a rewrite rule, namely the rule which substitutes LM_{σ}(g) with the element g′ which represents the same residue class. If we have a bunch of non-zero vectors {g_{1}, …, g_{s}}, we get a bunch of rewrite rules. What kind of game can we play with those rules?

Suppose a vector m ∈ P^{r} contains a term in its support which is a multiple of LT_{σ}(g_{i}) for some i ∈ {1, …, s}. Then we can use the rule associated to g_{i} and rewrite m. The element obtained in this way is congruent to m modulo M. The procedure of moving from one representative of this residue class to another resembles the division algorithm. However, at each point we may have several moves available, and a different order of those moves could lead to a different result. A generating set {g_{1}, …, g_{s}} of M is special if, no matter which order you choose, you always arrive at the same result. In Section 2.2, we treat rewrite rules and prove the surprising fact that this new kind of specialty is equivalent to the ones described before.

However, the most fundamental motive for looking at special systems of generators is still missing. The notion of a syzygy of a tuple (g_{1}, …, g_{s}) is one of the decisive ideas for successful applications of Computational Commutative Algebra. Using the theory of gradings developed in Section 1.7, we show that every syzygy of (LT_{σ}(g_{1}), …, LT_{σ}(g_{s})) can be lifted to a syzygy of (g_{1}, …, g_{s}) if and only if {g_{1}, …, g_{s}} has the special properties discussed earlier.

After threatening to do it for a long time, we finally combine all those ideas and introduce Gröbner bases. A Gröbner basis of a submodule M of P^{r} is a set of generators which is special in one (and therefore all) of the above ways. In Section 2.4 we launch an investigation into their properties and uses by showing that their existence can be viewed as a consequence of Dickson’s Lemma. Most applications of Gröbner bases will be treated in Chapter 3 and Volume 2, but some rewards for our careful preparations can be reaped immediately, for instance a proof of Hilbert’s Basis Theorem, the notion of normal forms, the submodule membership test, and a new version of Macaulay’s Basis Theorem.

Next we put a great emphasis on the derived notion of a reduced Gröbner basis. It has the astonishing property that, given a submodule M of P^{r} and a term ordering σ, it is a unique system of generators of M satisfying certain natural conditions. We believe that this is one of the most ubiquitous theoretical tools in Computational Commutative Algebra. Just to give the flavour of its importance, we show how one can use it to deduce a seemingly unrelated result about the existence and uniqueness of the field of definition of submodules of P^{r}.

After all this theory, it is time to explain how one can actually step into action and compute a Gröbner basis of M from a given finite set of generators. The power of our study of syzygies enables us to capture the spirit of Buchberger’s Algorithm in Section 2.5. Not only shall we prove and improve its basic procedure, but we shall also finally achieve our goal of effectively computing in residue class modules via Macaulay’s Basis Theorem and normal forms.

As sometimes happens in real life, including science, the discovery of a tool which enables us to solve one problem opens the door to many other discoveries. Gröbner bases are certainly one of those tools, but before delving into the realm of their applications, we close the chapter with another one, namely Hilbert’s Nullstellensatz. This theorem is one of the milestones in the process of translating algebra into geometry and geometry into algebra and forms the background for many applications in algebraic geometry. Section 2.6 is entirely devoted to its proof, which also uses some pieces of Gröbner basis theory. It highlights the importance of switching from one ground field to a field extension, so that the geometric notion of an affine variety gets its proper perspective.

Once more the chapter closes with an opening theme. Besides being a metaphor of life, this end of one struggle already lays the groundwork for successful applications in subsequent chapters.

2.1 Special Generation

All animals are equal.

But some animals are more equal than others. (George Orwell)

Let f be a non-zero polynomial and g a non-zero polynomial in the principal ideal generated by f, i.e. let g = hf for a suitable polynomial h. If σ is a monoid ordering on 𝕋^{n}, then LT_{σ}(g) = LT_{σ}(hf) = LT_{σ}(h) LT_{σ}(f). In other words, the leading term of every element in the principal ideal generated by f is in the ideal generated by LT_{σ}(f).

On the other hand, let us go back for a moment to Example 1.5.5. We saw that for f = y(x^{2} − 1) − x(xy − 1) = x − y and σ = DegLex the leading monomials of the two summands cancel out, so that x, the leading term of the result, is smaller than the leading terms of the summands. This shows that some generators have a special behaviour with respect to the leading terms of the elements they generate. More precisely, we see that x = LT_{σ}(f) ∉ (LT_{σ}(x^{2} − 1), LT_{σ}(xy − 1)) = (x^{2}, xy). However, if we add in this example the elements guaranteed by Proposition 1.5.6.b, we get another set of generators of the ideal (x^{2} − 1, xy − 1) whose leading terms generate the leading term ideal.

This is the prototypical case of the phenomenon that not all systems of generators of an ideal or module are equal alluded to in the introduction of this chapter. Some systems of generators have special properties which we want to describe in this and the following sections. Later it will become clear that all of those properties are incarnations of the same concept, namely the concept of Gröbner bases.

As usual, we let K be a field, n ≥ 1, P = K[x_{1}, …, x_{n}] a polynomial ring, r ≥ 1, and σ a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩.

Proposition 2.1.1. (Special Generation of Submodules) Let M ⊆ P^{r} be a P -submodule, and let g_{1}, …, g_{s} ∈ P^{r} \ {0}. Then the following conditions are equivalent. A_{1}) For every element m ∈ M \ {0}, there are f_{1}, …, f_{s} ∈ P such that

m = ∑_{i=1}^{s} f_{i}g_{i} and LT_{σ}(m) ≥_{σ} LT_{σ}(f_{i}g_{i}) for all i = 1, …, s such that

f_{i}g_{i} ≠ 0.

A_{2}) For every element m ∈ M \{0}, there are f_{1}, …, f_{s} ∈ P such that m = ∑_{i=1}^{s} f_{i}g_{i} and LT_{σ}(m) = max_{σ}{LT_{σ}(f_{i}g_{i}) | i ∈ {1, …, s}, f_{i}g_{i} ≠ 0}.

Proof. Since Condition A_{2}) obviously implies A_{1}), it suffices to prove the reverse direction. The inequality “≥_{σ} ” in A_{2}) follows immediately from A_{1}). The inequality “≤_{σ} ” in A_{2}) follows from Proposition 1.5.3.a. □

If M ⊆ P^{r} is a P -submodule and g_{1}, …, g_{s} ∈ M \ {0}, then Conditions A_{1}) and A_{2}) say that {g_{1}, …, g_{s}} is a special system of generators of M. Using the example mentioned above, we see that it is not true that Conditions A_{1}) and A_{2}) hold for every system of generators of M, because LT_{σ}(f) <_{σ} max_{σ}{x^{2}, xy} ≤_{σ} max_{σ}{LT_{σ}(f_{1}(x^{2} − 1)), LT_{σ}(f_{2}(xy − 1))}, independent of which elements f_{1}, f_{2} ∈ P \ {0} we choose.

It is also interesting to observe that if τ is a term ordering on 𝕋^{n} and σ is a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩ which is compatible with τ, then we can expand LT_{σ}(f_{i}g_{i}) = LT_{τ} (f_{i}) LT_{σ}(g_{i}) in the above statements.

The intuitive meaning of Conditions A_{1}) and A_{2}) is that every element m ∈ M \ {0} should have a representation m = ∑_{i=1}^{s} f_{i}g_{i} such that the highest term which occurs in the computation of the right-hand side does not cancel. Consequently, the leading term of m is a multiple of one of the terms LT_{σ}(g_{1}), …, LT_{σ}(g_{s}). Now we examine this last property more closely.

Proposition 2.1.2. (Generation of Leading Term Modules) Let M ⊆ P^{r} be a P -submodule and g_{1}, …, g_{s} ∈ M \{0}. Then the following conditions are equivalent. B_{1}) The set {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})} generates the 𝕋^{n}-monomodule LT_{σ}{M}. B_{2}) The set {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})} generates the P -submodule LT_{σ}(M)

of ℙ^{r}.

Proof. Since B_{1}) implies B_{2}) by definition, it suffices to show the reverse direction. Let m ∈ M \ {0}, and let LT_{σ}(m) = f_{1} LT_{σ}(g_{1}) + ⋯ + f_{s} LT_{σ}(g_{s}) for some polynomials f_{1}, …, f_{s} ∈ P. By Proposition 1.5.3.a, the term LT_{σ}(m) is in the support of one of the vectors f_{1} LT_{σ}(g_{1}), …, f_{s} LT_{σ}(g_{s}). Thus there is an index i ∈ {1, …, s} and a term t ∈ Supp(f_{i}) such that LT_{σ}(m) = t · LT_{σ}(g_{i}). □

Finally, we show the first important link between the two properties of special systems of generators which we have described so far.

Proposition 2.1.3. Let M ⊆ P^{r} be a P -submodule, and let g_{1}, …, g_{s} be non-zero elements of M. Then Conditions A_{1}), A_{2}) of Proposition 2.1.1 and Conditions B_{1}), B_{2}) of Proposition 2.1.2 are equivalent.

Proof. Condition A_{2}) implies B_{1}) by Proposition 1.5.3.d. Thus we show B_{1}) ⇒ A_{1}). Suppose there exists an element m ∈ M \ {0} which cannot be represented in the desired way. By Theorem 1.4.19, there exists such an element m with minimal leading term with respect to σ. By B_{1}), we have LT_{σ}(m) = t · LT_{σ}(g_{i}) for some i ∈ {1, …, s} and some t ∈ 𝕋^{n}. Clearly, we have m − \frac{LC_{σ}(m)}{LC_{σ}(g_{i})}tg_{i} ≠ 0, since m = \frac{LC_{σ}(m)}{LC_{σ}(g_{i})}tg_{i} would be a representation

satisfying A_{1}). Therefore we find LT_{σ}(m − \frac{LC_{σ}(m)}{LC_{σ}(g_{i})}tg_{i}) <_{σ} LT_{σ}(m), and the

element m− \frac{LC_{σ}(m)}{LC_{σ}(g_{i})}tg_{i} ∈ M \\{0\} can be represented as required in A_{1}). But then also m can be represented as required in A_{1}), in contradiction with our assumption. □

Exercise 1. Give an example of a term ordering σ, a module M ⊆ P^{r}, and a set of elements {g_{1}, …, g_{s}} ⊆ P^{r} \M which satisfies Conditions A_{1}) and A_{2}).

Exercise 2. Let K be a field, let P = K[x_{1}, …, x_{n}], let σ be a term ordering on 𝕋^{n}, let g_{1}, g_{2} ∈ P be two K -linearly independent linear polynomials, and let i_{1}, i_{2} ∈ {1, …, n} be such that x_{i_{1}} = LT_{σ}(g_{1}) and x_{i_{2}} = LT_{σ}(g_{2}). Prove that the following conditions are equivalent.

a) Conditions A_{1}) and A_{2}) hold for g_{1} , g_{2} .

b) x_{i_{1}} ≠ x_{i_{2}}

Exercise 3. Prove that for r = 1 and σ = RevLex, Conditions B_{1}) and B_{2}) are strictly weaker than A_{1}) and A_{2}).

Exercise 4. Let r = 1 and σ = DegLex. Show that the polynomials g_{1} = x_{1}x_{2} − x_{2} and g_{2} = x_{1}^{2} − x_{2} do not have properties B_{1}) and B_{2}). Find LT_{DegLex}((g_{1}, g_{2})) and a third polynomial g_{3} ∈ (g_{1}, g_{2}) such that {g_{1}, g_{2}, g_{3}} satisfies B_{1}) and B_{2}).

Exercise 5. Let σ be a term ordering on 𝕋^{2} , and let g_{1} = x^{3} − 1 and g_{2} = y^{3} − y. Prove that {g_{1}, g_{2}} satisfies B_{1}) and B_{2}). Represent f = x^{3}y + xy^{3} − x^{3} − xy − y + 1 as a combination of g_{1} and g_{2} according to Condition A_{1}).

Tutorial 17: Minimal Polynomials of Algebraic Numbers

In this tutorial we let K be a field and L = K[x]/(f) a finite extension field of K, where f ∈ K[x] is an irreducible polynomial of degree d. We represent an element ℓ ∈ L as the residue class of a polynomial g ∈ K[x] and ask the following question.

How can one compute the minimal polynomial of ℓ over K? Below we shall develop two elementary approaches to this question. In

Section 3.6, we shall see a more general method for determining the minimal polynomial of an element in an arbitrary finitely generated K -algebra.

a) Let x̄ be the residue class of x in L. Show that {1, x̄, …, x̄^{d−1}} is a K -basis of L and conclude that the minimal polynomial of ℓ over K has degree ≤ d.

b) For i = 0, …, d, let a_{i} ∈ K be the coefficient of x^{i} in the minimal polynomial of ℓ over K and h_{i} ∈ K[x] the remainder of the division of g^{i} by f. Prove a_{0} + a_{1}h_{1} + ⋯ + a_{d}h_{d} = 0 and show that this yields a system of d linear equations for a_{0}, …, a_{d}. Explain how we can use its solution space to answer our question.

c) Implement the method developed in b) in a CoCoA function LinAlgMP(…) which takes f and g and computes the minimal polynomial of ℓ over K. Hint: You may use the CoCoA function Syz(…) to find the solution space of a system of linear equations. d) Apply your function LinAlgMP(…) to compute the minimal polynomials

over ℚ of the following algebraic numbers.

1) \frac{1}{2} + \frac{i}{2} \sqrt{3}

2) ^{4} \sqrt{2} + \sqrt{2} + 2

3) (x̄^{3}+x̄−1)/x̄, where f = x^{5}−x−2. (Hint: Notice that \frac{1}{x̄} = \frac{1}{2}x̄^{4}− \frac{1}{2} .)

e) Now we consider the ideal I = (x_{2}−g(x_{1}), f(x_{1})) ⊆ K[x_{1}, x_{2}]. Prove that a polynomial h ∈ K[x_{2}] satisfies h(ℓ) = 0 if and only if h ∈ I. Conclude that the minimal polynomial of ℓ over K is an element of minimal degree in the principal ideal I ∩ K[x_{2}]. (Hint: Show that K[x_{1}, x_{2}]/I ≅ L.)

f) Prove that LT_{Lex}(I) contains a power of x_{2} . Conclude that, in order to find the minimal polynomial of ℓ over K, it suffices to compute a system of generators of I which satisfies Conditions B_{1}) and B_{2}) with respect

to Lex.

g) Write a CoCoA function LexMP(…) which takes f and g and computes the minimal polynomial of ℓ over K using the method developed in f). (Hint: You may assume that the base ring is Q[x[1], x[2]], Lex and apply the CoCoA function LT(I).) Use your function LexMP(…) to check your results in d).

h) Compute the minimal polynomial of (x̄^{3} + x̄ − 1)/x̄^{5} over ℚ in the case f = x^{7} − x − 1 using both LinAlgMP(…) and LexMP(…). Write down the two polynomials whose leading terms generate LT_{Lex}(I) = (x_{1}, x_{2}^{7}). Which of the two methods is in general more efficient? Why?

i) Develop different methods for computing the representation of ℓ^{−1} in the K -basis {1, x̄, …, x̄^{d−1}} of L using the following ideas.

1) Linear Algebra

2) The Extended Euclidean Algorithm Prove the correctness of your methods. Then write two CoCoA functions LinAlgInv(…) and ExtEucInv(…), and compare the results in the cases of d).

2.2 Rewrite Rules

All roads lead to Rome.

(Roman Proverb)

All roads do not lead to Rome. (Slovenian Proverb)

Let us go back to the Division Algorithm discussed in Section 1.6 and try to understand its working more deeply. What is its essence? If we look at Theorem 1.6.4, we see that the event which triggers steps 2) and 3) is the detection of a term in the support of m which is a multiple of one of the leading terms LT_{σ}(g_{1}), …, LT_{σ}(g_{s}). Once such a term is found, the basic operation is to replace it by smaller terms.

A closer look at what happens is provided by the following example. Let f = x^{2}y, g_{1} = x^{2} − x + 1, g_{2} = xy − x − y + 3, and let σ = DegLex. Since x^{2}y is a multiple of LT_{σ}(g_{1}), the first step of the Division Algorithm applied to f and (g_{1}, g_{2}) yields f = y · g_{1} + 0 · g_{2} + (f − yg_{1}), and we find f − yg_{1} = y(x − 1). In this first step we have replaced f by f − yg_{1} . The core of this operation is to take g_{1} , write it as x^{2} − (x − 1), and replace x^{2} by x − 1. Thus we use g_{1} as a rule for replacing its head, namely x^{2} , by its tail, namely x − 1. Clearly, if a polynomial g_{1} is written as a − b, we have a = b mod (g_{1}), but here we emphasize the fact that a = b mod (g_{1}) can be viewed as a rule for replacing a by b. In other words, we orient the equality by destroying its symmetry in order to use a polynomial as a rewrite rule.

Now we continue with the Division Algorithm. First we observe that LT_{σ}(xy − y) = xy is a multiple of LT_{σ}(g_{2}). So the second step yields f = y · g_{1} + 1 · g_{2} + (f − yg_{1} − g_{2}) and f − yg_{1} − g_{2} = x − 3. Again we stress the point that the core of this operation is to use g_{2} as a rewrite rule in the sense that its leading term xy is replaced by its tail x + y − 3. Here the Division Algorithm stops.

Suppose instead that we perform the Division Algorithm with respect to f and (g_{2}, g_{1}). Then we get f = (x + 1) · g_{2} + 1 · g_{1} + (f − (x + 1)g_{2} − g_{1}), and we see that f − (x + 1)g_{2} − g_{1} = −x + y − 4. The algorithm stops and returns an output which is not the same as before.

Summarizing, we can say that the core of the Division Algorithm is to use the elements g_{1}, …, g_{s} as rewrite rules. To use g_{i} as a rewrite rule means to replace the leading term of g_{i} by the remaining part of it, with the obvious adjustment if g_{i} is not monic. Of course we should be allowed to use the rewrite rules repeatedly. But in the Division Algorithm the rewrite rules have a well defined hierarchy, i.e. the application of the first rewrite rule is preferred to the second one, and so on. If we have the possibility of using several rewrite rules at a certain point, the Division Algorithm forces us to use the first one in the hierarchy.

What happens if we destroy this hierarchy? Then we are allowed to use at each step any applicable rewrite rule, but the drawback is immediately clear. A look at the previous example convinces us that different possible paths may lead to different results. So the natural question is whether there are sets of rewrite rules such that all possible paths can be continued until they reach the same result. “Confluence” is the name of this game and the essence of this section, a modern version of the motto “all roads lead to Rome”.

And there is a final surprising result. We will discover that for a set of polynomials or vectors of polynomials, being special in the sense of confluence is equivalent to being special in the sense of Conditions A) and B) described in Section 2.1. Thus rewrite rules provide a different aspect of the same phenomenon. Although it is beyond the scope of this book, it turns out that this view is most suitable for generalizations in a number of directions, e.g. to the non-commutative case.

Now it is time to study these ideas in a more technical manner. Let K be a field, n ≠ 1, P = K[x_{1}, …, x_{n}] a polynomial ring, r ≥ 1, and σ a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩.

Definition 2.2.1. Let g_{1}, …, g_{s} ∈ P^{r} \ {0} and G = {g_{1}, …, g_{s}}.

a) Let m_{1}, m_{2} ∈ P^{r}, and suppose there exist a constant c ∈ K, a term t ∈ 𝕋^{n}, and an index i ∈ {1, …, s} such that m_{2} = m_{1} − c tg_{i} and t · LT_{σ}(g_{i}) ∉ Supp(m_{2}). Then we say that m_{1} reduces to m_{2} in one step using the rewrite rule defined by g_{i} (or simply that m_{1} reduces to m_{2} in one step using g_{i}), and we write m_{1} ⟶^{g_{i}} m_{2} . The passage from m_{1} to m_{2} is also called a reduction step.

b) The transitive closure of the relations ⟶^{g_{1}}, …, ⟶^{g_{s}} is called the rewrite relation defined by G and is denoted by ⟶^{G}. In other words, for m_{1}, m_{2} ∈ P^{r}, we let m_{1} ⟶^{G} m_{2} if and only if there exist indices i_{1}, …, i_{t} ∈ {1, …, s} and elements m′_{0}, …, m′_{t} ∈ P^{r} such that

m_{1} = m′_{0} ⟶^{g_{i_{1}}} m′_{1} ⟶^{g_{i_{2}}} ⋯ ⟶^{g_{i_{t}}} m′_{t} = m_{2}

c) An element m_{1} ∈ P^{r} with the property that there is no i ∈ {1, …, s} and no m_{2} ∈ P^{r} \ {m_{1}} such that m_{1} ⟶^{g_{i}} m_{2} is called irreducible with respect to ⟶^{G}.

d) The equivalence relation defined by ⟶^{G} will be denoted by ⟷^{G}.

In part a) of this definition, we can choose c = 0 and t ∈ 𝕋^{n} such that t·LT_{σ}(g_{i}) ∉ Supp(m_{1}). This is called a trivial reduction. By using it we see that m_{1} ⟶^{g_{i}} m_{1} . In the example mentioned in the introduction, we have for

instance f ⟶^{g_{1}} xy −y and xy −y ⟶^{g_{2}} x−3. Thus f ⟶^{G} x−3 and x−3 ⟷^{G} f

hold, while x − 3 ⟶^{G} f is not true, because the leading term of f is larger than x.

Proposition 2.2.2. (Properties of Rewrite Relations) Let g_{1}, …, g_{s} ∈ P^{r} \ {0}, and let G = {g_{1}, …, g_{s}}.

a) If m_{1}, m_{2} ∈ P^{r} satisfy m_{1} ⟶^{G} m_{2} and m_{2} ⟶^{G} m_{1} , then m_{1} = m_{2} .

b) If m_{1}, m_{2} ∈ P^{r} satisfy m_{1} ⟶^{G} m_{2} , and if t ∈ 𝕋^{n}, then we have

tm_{1} ⟶^{G} tm_{2} .

c) Every chain m_{1} ⟶^{G} m_{2} ⟶^{G} ⋯ such that m_{1}, m_{2}, … ∈ P^{r} becomes eventually stationary.

d) If m_{1}, m_{2} ∈ P^{r} satisfy m_{1} ⟶^{g_{i}} m_{2} for i ∈ {1, …, s}, and if m_{3} ∈ P^{r},

then there exists an element m_{4} ∈ P^{r} such that m_{1} + m_{3} ⟶^{G} m_{4} and

m_{2} + m_{3} ⟶^{G} m_{4} .

e) If m_{1}, m_{2}, m_{3}, m_{4} ∈ P^{r} satisfy m_{1} ⟷^{G} m_{2} and m_{3} ⟷^{G} m_{4} , then we

have m_{1} + m_{3} ⟷^{G} m_{2} + m_{4} .

f) If m_{1}, m_{2} ∈ P^{r} satisfy m_{1} ⟷^{G} m_{2} , and if f ∈ P, then we have

fm_{1} ⟷^{G} fm_{2} .

g) For m ∈ P^{r}, we have m ⟷^{G} 0 if and only if m ∈ ⟨g_{1}, …, g_{s}⟩.

h) For m_{1}, m_{2} ∈ P^{r}, we have m_{1} ⟷^{G} m_{2} if and only if m_{1} − m_{2} ∈ ⟨g_{1}, …, g_{s}⟩.

Proof. To show claim a), we consider a chain of reduction steps which repre-

sents m_{1} ⟶^{G} m_{2} ⟶^{G} m_{1} , i.e. a chain m_{1} = m′_{0} ⟶^{g_{i_{1}}} ⋯ ⟶^{g_{i_{t}}} m′_{t} = m_{1} such that

i_{1}, …, i_{t} ∈ {1, …, s} and m′_{j} = m_{2} for some j ∈ {1, …, t − 1}. The effect of a reduction step is that a term is replaced by other terms, all of which are smaller with respect to σ. So let te_{k} with t ∈ 𝕋^{n} and k ∈ {1, …, s} be the largest term with respect to σ which is reduced in this chain. This term is not contained in the support of the result anymore, unless each reduction step is trivial, i.e. unless m_{1} = m_{2} .

Claim b) holds, since it holds at each reduction step. Thus we prove c) now. Suppose there exist i_{1}, i_{2}, … ∈ {1, …, s} and m_{1}, m_{2}, … ∈ P^{r} such that we have a chain of reduction steps m_{1} ⟶^{g_{i_{1}}} m_{2} ⟶^{g_{i_{2}}} ⋯ which does not become stationary. The first claim is that each m_{i} must have a term in its support which reduces eventually. Indeed we observe that if this does not happen, it means that starting from m_{i} the sequence of reductions is actually a sequence of equalities. Therefore there exists a term t_{i} in Supp(m_{i}) which is the largest term with respect to σ which is reduced later in the chain. Then we have t_{1} ≥_{σ} t_{2} ≥_{σ} ⋯, and since every term t_{i} is reduced eventually, this chain does not become stationary either, in contradiction with Theorem 1.4.19.

For the proof of d), we let c ∈ K, t ∈ 𝕋^{n}, and i ∈ {1, …, s} be such that m_{2} = m_{1} − c tg_{i} and t LT_{σ}(g_{i}) ∉ Supp(m_{2}). Clearly we may assume c ≠ 0. We let c′ be the coefficient of t LT_{σ}(g_{i}) in m_{3} and distinguish two cases. When c′ = −c, we have m_{1} + m_{3} = m_{2} + m_{3} + c tg_{i} = m_{2} + m_{3} − c′tg_{i}. Since the coefficient of t LT_{σ}(g_{i}) in m_{2} + m_{3} − c′tg_{i} vanishes, we get m_{2} + m_{3} ⟶^{g_{i}} m_{1} + m_{3} , and we can choose m_{4} = m_{1} + m_{3} . When c′ ≠ −c we define m_{4} by

m_{4} = m_{1} + m_{3} − (c + c′)tg_{i} = m_{2} + m_{3} − c′tg_{i}

and obtain the claim, because the coefficient of t LT_{σ}(g_{i}) vanishes in m_{4} .

Next, claim e) follows from d), and f) follows from b) and e) by representing f as a sum of monomials. Since h) is an immediate consequence of e) and g), it remains to show g). If m ⟷^{G} 0, we collect the terms used in the various reduction steps and get a representation m = f_{1}g_{1} + ⋯ + f_{s}g_{s} with f_{1}, …, f_{s} ∈ P. Conversely, given an element m ∈ P^{r} with such a representation, it suffices by e) to prove f_{i}g_{i} ⟷^{G} 0 for i = 1, …, s. This follows from

g_{i} ⟷^{G} 0 and f). □

Unfortunately, it is not clear how we could use part g) of the above proposition to check whether a given element m ∈ P^{r} is contained in the submodule ⟨g_{1}, …, g_{s}⟩, because we do not know the direction of the reduction steps used in m ⟷^{G} 0. In other words, if we use only reduction steps m = m_{0} ⟶^{g_{i_{1}}} m_{1} ⟶^{g_{i_{2}}} ⋯, we might get stuck at some point with an irreducible element with respect to ⟶^{G}. The next example shows that this can really happen.

Example 2.2.3. Let n = 3, r = 1, G = {g_{1}, g_{2}} with g_{1} = x_{1}^{2}−x_{2} and g_{2} = x_{1}x_{2} − x_{3} , and let σ be the term ordering DegRevLex. Then the polynomial f = x_{1}^{2}x_{2} − x_{1}x_{3} is contained in the ideal (g_{1}, g_{2}), since f = x_{1}g_{2} . But if we use the reduction step f ⟶^{g_{1}} x_{2}^{2} − x_{1}x_{3} , we arrive at an irreducible element with respect to ⟶^{G}.

It is also important to notice that if σ is not a term ordering, then claim c) of Proposition 2.2.2 may fail to hold, as the following example shows.

Example 2.2.4. Let n = 2, let r = 1, let G = {g} with g = x − xy, and let σ = RevLex. Then the chain x ⟶^{g} xy ⟶^{g} xy^{2} ⟶^{g} ⋯ does not become stationary.

After seeing the main properties of rewrite relations, we want to investigate the property of confluence which, as we said before, is crucial for later applications.

Proposition 2.2.5. Let g_{1}, …, g_{s} ∈ P^{r} \ {0}, let G = {g_{1}, …, g_{s}}, and let M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}. Then the following conditions are equivalent.

C_{1}) For an element m ∈ P^{r}, we have m ⟶^{G} 0 if and only if m ∈ M. C_{2}) If m ∈ M is irreducible with respect to ⟶^{G}, then we have m = 0. C_{3}) For every element m_{1} ∈ P^{r}, there is a unique element m_{2} ∈ P^{r} such

that m_{1} ⟶^{G} m_{2} and m_{2} is irreducible with respect to ⟶^{G}.

C_{4}) If m_{1}, m_{2}, m_{3} ∈ P^{r} satisfy m_{1} ⟶^{G} m_{2} and m_{1} ⟶^{G} m_{3} , then there exists an element m_{4} ∈ P^{r} such that m_{2} ⟶^{G} m_{4} and m_{3} ⟶^{G} m_{4} . (A relation ⟶^{G} with this property is called confluent.)

[figure: m_{1}; m_{3}; m_{2}; m_{4}; G; G; G; G]

Proof. For the proof of C_{1}) ⇒ C_{2}), we note that if m ∈ M, then C_{1}) implies m ⟶^{G} 0. Thus if m is irreducible with respect to ⟶^{G}, we get m = 0. Next we show that C_{2}) implies C_{3}). By Proposition 2.2.2.c, there is an element m_{2} ∈ P^{r} which is irreducible with respect to ⟶^{G} and which satisfies m_{1} ⟶^{G} m_{2} . Suppose m′_{2} ∈ P^{r} is another element with those properties. Then we have m_{2} − m′_{2} ∈ M, since m_{1} ⟶^{G} m_{2} and m_{1} ⟶^{G} m′_{2} . Furthermore, the element m_{2} − m′_{2} is irreducible with respect to ⟶^{G}, since no term in Supp(m_{2})∪Supp(m′_{2}) is a multiple of one of the terms LT_{σ}(g_{1}), …, LT_{σ}(g_{s}). By C_{2}), we conclude m_{2} = m′_{2} .

Now we prove C_{3}) ⇒ C_{4}). By Proposition 2.2.2.c, there are elements m′_{2}, m′_{3} ∈ P^{r} which are irreducible with respect to ⟶^{G} and which satisfy

m_{2} ⟶^{G} m′_{2} as well as m_{3} ⟶^{G} m′_{3} . From m_{1} ⟶^{G} m′_{2} , m_{1} ⟶^{G} m′_{3} , and C_{3}), we

conclude m′_{2} = m′_{3} . Then the claim follows for m_{4} = m′_{2} = m′_{3} .

Finally, to show C_{4}) ⇒ C_{1}), it suffices, by Proposition 2.2.2.g, to prove m ⟶^{G} 0 for m ∈ M, where we already know m ⟷^{G} 0. Let m_{1}, …, m_{t} ∈ P^{r} be such that m_{1} = m, m_{t} = 0, and for all i = 1, …, t − 1 we either have

m_{i} ⟶^{G} m_{i+1} or m_{i+1} ⟶^{G} m_{i}. Let ℓ ∈ {1, …, t − 2} be the largest index

such that m_{ℓ+1} ⟶^{G} m_{ℓ}. Then we have m_{ℓ+1} ⟶^{G} 0 and m_{ℓ+1} ⟶^{G} m_{ℓ}, and C_{4}) yields m_{ℓ} ⟶^{G} 0. If we replace the sequence m = m_{1}, …, m_{t} = 0 by the shorter sequence m = m_{1}, …, m_{ℓ}, 0, we see that the claim follows by induction. □

The remainder of this section deals with connections between confluent rewrite relations and the previous section. First we prove a useful technical result.

Lemma 2.2.6. Let g_{1}, …, g_{s} ∈ P^{r} \ {0}, let G = {g_{1}, …, g_{s}}, and let M = ⟨g_{1}, …, g_{s}⟩. Assume that an element m ∈ M \ {0} satisfies m ⟶^{G} 0.

a) There exist an index α ∈ {1, …, s} and a term t ∈ 𝕋^{n} such that LT_{σ}(m) = t · LT_{σ}(g_{α}). b) By collecting all reduction steps in m ⟶^{G} 0, we get f′_{1}, …, f′_{s} ∈ P such

that m − \frac{LC_{σ}(m)}{LC_{σ}(g_{α})} t g_{α} = ∑_{i=1}^{s} f′_{i}g_{i} and such that LT_{σ}(m) >_{σ} LT_{σ}(f′_{i}g_{i}) for i = 1, …, s with f′_{i}g_{i} ≠ 0.

c) If we put f_{i} = f′_{i} for i ∈ \{1, …, s\} \ \{α\} and f_{α} = f′_{α} + \frac{LC_{σ}(m)}{LC_{σ}(g_{α})} t, then we obtain an element m = ∑_{i=1}^{s} f_{i}g_{i} whose leading term satisfies LT_{σ}(m) = max_{σ}{LT_{σ}(f_{i}g_{i}) | i ∈ {1, …, s}, f_{i}g_{i} ≠ 0}.

Proof. Claim a) follows immediately from the fact that LT_{σ}(m) has to be eliminated at one of the reduction steps.

Now we prove b). Let m_{1}, …, m_{t} ∈ P^{r} be such that m_{1} = m, m_{t} = 0, and for all i = 1, …, t − 1 we have m_{i} ⟶^{G} m_{i+1} using one reduction step. By a), there exists a reduction step where the leading term of m is reduced. This step is unique, since it substitutes LT_{σ}(m) with smaller terms. So, let ℓ ∈ \{1, …, t − 1\} be such that m_{ℓ+1} = m_{ℓ} − \frac{LC_{σ}(m)}{LC_{σ}(g_{α})} t g_{α}. Then

m − \frac{LC_{σ}(m)}{LC_{σ}(g_{α})} t g_{α} = m − (m_{ℓ} − m_{ℓ+1}) = ∑_{i=1}^{ℓ−1}(m_{i} − m_{i+1}) + ∑_{i=ℓ+1}^{t−1}(m_{i} − m_{i+1})

is of the form ∑_{i=1}^{s} f′_{i}g_{i}. Here the polynomials f′_{i} are obtained by collecting the elements of type c t appearing in the two sums, where each difference m_{i} − m_{i+1} is of the form m_{i} − m_{i+1} = c t g_{β} for some c ∈ K, t ∈ 𝕋^{n}, and β ∈ {1, …, s}. To conclude the proof it suffices to observe that when we write m_{i} − m_{i+1} = c t g_{β}, we get t LT_{σ}(g_{β}) ≤_{σ} LT_{σ}(m_{i}) by the definition of a reduction step.

Finally, we see that c) is an immediate consequence of b). □

Let us examine the claims of this lemma in a concrete case.

Example 2.2.7. Let g_{1} = x^{2} − xy, g_{2} = xy − x − z, and g_{3} = xy + xz be polynomials in ℚ[x, y, z], let G = {g_{1}, g_{2}, g_{3}}, and let σ = DegLex. Suppose we want to reduce the polynomial x^{3} with respect to the rewrite relation ⟶^{G}.

One possibility is to apply the following chain of reduction steps.

x^{3} ⟶^{g_{1}} x^{2}y ⟶^{g_{2}} x^{2} + xz ⟶^{g_{1}} xy + xz ⟶^{g_{3}} 0

As predicted by part a) of the lemma, we find x^{3} = LT_{σ}(x^{3}) = x LT_{σ}(g_{1}). Furthermore, by collecting the reduction steps, we get x^{3}−xg_{1} = xg_{2}+g_{1}+g_{3} , where x^{3} = LT_{σ}(x^{3}) is strictly bigger than x^{2}y = LT_{σ}(xg_{2}), x^{2} = LT_{σ}(g_{1}), and xy = LT_{σ}(g_{3}) with respect to σ.

Finally, to check part c) of the lemma, we also bring xg_{1} to the other side and write

x^{3} = (x + 1)g_{1} + xg_{2} + g_{3}

Here we have x^{3} = max_{σ}{LT_{σ}((x + 1)g_{1}), LT_{σ}(xg_{2}), LT_{σ}(g_{3})}, as claimed.

Unfortunately, the lemma requires that the element reduces to zero. In our case, we could have followed a different sequence of reduction steps, for instance

x^{3} ⟶^{g_{1}} x^{2}y ⟶^{g_{1}} xy^{2} ⟶^{g_{2}} xy + yz ⟶^{g_{2}} yz + x + z

Here we end up with an element which cannot be reduced further and which is non-zero. By looking at this sequence of instruction steps, we cannot decide whether x^{3} satisfies the hypothesis of the lemma.

Both in the introduction to this section and in the previous example we have seen that the property of being confluent is not shared by all rewrite relations. Is there a better way of understanding it? The following proposition gives a somehow unexpected answer.

Proposition 2.2.8. Let g_{1}, …, g_{s} ∈ P^{r} \ {0}, let G = {g_{1}, …, g_{s}}, and let M = ⟨g_{1}, …, g_{s}⟩. Then Conditions A_{1}), A_{2}) of Proposition 2.1.1 are equivalent with Conditions C_{1}), C_{2}), C_{3}), and C_{4}) of Proposition 2.2.5.

Proof. To prove A_{2}) ⇒ C_{2}) by contradiction, we suppose that there is an element m ∈ M \ {0} which is irreducible with respect to ⟶^{G}. By Condition A_{2}), the element m has a representation m = ∑_{i=1}^{s} f_{i}g_{i} such that f_{1}, …, f_{s} ∈ P and LT_{σ}(m) = max_{σ}{LT_{σ}(f_{i}g_{i}) | i ∈ {1, …, s}, f_{i}g_{i} ≠ 0}. Let t LT_{σ}(g_{i}) be the term which achieves this maximum. Then the element m′ = m − \frac{LC_{σ}(m)}{LC_{σ}(g_{i})}tg_{i} satisfies m ⟶^{G} m′ and m′ ≠ m, a contradiction.

Conversely, C_{1}) ⇒ A_{2}) follows directly from Lemma 2.2.6. □

Exercise 1. Let σ be a module term ordering, let g ∈ P^{r} \ {0}, and let G = {g}. Show that the rewrite relation ⟶^{G} is confluent.

Exercise 2. Let σ be a module term ordering, and let G be a finite set of terms in P^{r}. Show that Conditions C) of Proposition 2.2.5 hold for the rewrite relation ⟶^{G}.

Exercise 3. Give an example of a rewrite relation ⟶^{G} which is not confluent.

Exercise 4. Let σ be a monoid ordering on 𝕋^{n}, let t_{1}, t_{2} ∈ 𝕋^{n} be terms with t_{1} >_{σ} t_{2} , and let g = t_{1} − t_{2} . Consider the rewrite relation defined by G = {g}. (Observe that here we do not assume that σ is a term ordering.) Prove that the following conditions are equivalent.

a) t_{1} ∤ t_{2}

b) Every chain f_{1} ⟶^{G} f_{2} ⟶^{G} ⋯ such that f_{1}, f_{2}, … ∈ P becomes eventually stationary.

Tutorial 18: Algebraic Numbers

In this tutorial, we want to use CoCoA to give some hints about how one can effectively compute in the field \overline{ℚ} of algebraic numbers, i.e. the algebraic closure of ℚ. We shall compute only up to conjugates, i.e. we shall represent an algebraic number by its minimal polynomial over ℚ. To distinguish between conjugate algebraic numbers, we would also have to provide reasonably good approximations in ℚ[i]. Furthermore, we shall be content to find some polynomial which has a certain algebraic number as one of its zeros. After factoring this polynomial using the CoCoA function Factor(…) one could then try to use methods of numerical analysis to find the factor which is the minimal polynomial of the desired algebraic number.

Let a_{1}, a_{2} ∈ \overline{ℚ} be two algebraic numbers represented by irreducible polynomials g_{1}, g_{2} ∈ ℚ[x] of degrees d_{1}, d_{2} , respectively.

a) Use Macaulay’s Basis Theorem 1.5.7 to show that the residue classes of {x_{1}^{i}x_{2}^{j} | 0 ≤ i < d_{1}, 0 ≤ j < d_{2}} form a ℚ-basis of the ℚ-algebra ℚ[x_{1}, x_{2}]/(g_{1}(x_{1}), g_{2}(x_{2})).

b) Show that one can find a polynomial having a_{1} + a_{2} as one of its zeros in the following way.

1) Represent the residue classes of the powers 1, x_{1} + x_{2}, (x_{1} + x_{2})^{2}, … in the basis given in a). Use the rewrite relation ⟶^{G} corresponding to G = {g_{1}(x_{1}), g_{2}(x_{2})} to find such representations.

2) Continue with step 1) until there is a linear relation between the representations of 1, x_{1} + x_{2}, …, (x_{1} + x_{2})^{d} for some d ≥ 0. Then there is a polynomial of degree d which vanishes at a_{1} + a_{2} .

c) Write a CoCoA program AlgSum(…) which takes the pair (g_{1}, g_{2}) and computes a polynomial which vanishes at a_{1} + a_{2} using the algorithm developed in b).

d) Repeat parts b) and c) for the product a_{1}a_{2} . In particular, write a CoCoA program AlgMult(…) which finds a polynomial which vanishes at a_{1}a_{2} .

e) Given an algebraic number a ∈ \overline{ℚ} represented by an irreducible polynomial g ∈ ℚ[x], what is the minimal polynomial of −a? Write a CoCoA program AlgNeg(…) which takes g and computes the minimal polynomial of −a.

f) Given a non-zero algebraic number a ∈ \overline{ℚ} represented by an irreducible polynomial g ∈ ℚ[x], what is the minimal polynomial of \frac{1}{a}? Write a CoCoA program AlgInv(…) which takes g and computes the minimal polynomial of \frac{1}{a}.

g) Apply your CoCoA programs AlgSum(…), AlgMult(…), AlgNeg(…), and AlgInv(…) in the following cases. (You’ll have to find g_{1}, g_{2} first!)

1) a_{1} = \sqrt{2}, a_{2} = \sqrt{3}

2) a_{1} = ^{3} \sqrt{3}, a_{2} = \frac{1}{2} + \frac{i}{2} \sqrt{3}

3) a_{1} = \sqrt{2} + \sqrt{3}, a_{2} = −i

2.3 Syzygies

Not in the beauty of the words lies the persuasion of an explanation,

but in their combination (συζυγία, syzygía). (Dionysius Halicarnassensis)

In the previous two sections we saw a number of conditions satisfied by certain special systems of generators of an ideal or module, but not by all of them. Although Proposition 1.5.6 says that such special systems of generators exist always, we do not yet know how to replace a given system of generators with another one having those additional properties.

In this section we change our point of view once more and look at these phenomena from the perspective of syzygies. Despite the exotic name, a syzygy is a very simple object to define. Namely, given a ring R and a tuple of elements (g_{1}, …, g_{s}) of an R-module, every tuple (f_{1}, …, f_{s}) of elements of R such that f_{1}g_{1} + ⋯ + f_{s}g_{s} = 0 is called a syzygy of (g_{1}, …, g_{s}). The introduction of syzygies will eventually achieve several goals. First of all, we see in this section that the failure of Conditions A), B), C) can be better understood in terms of syzygies. Even more important is the fact that in subsequent sections we shall use syzygies to find an algorithmic way to replace a given set of generators, which does not satisfy the conditions, with another one, which does.

What we have said so far suggests the importance of syzygies, and in fact they turn out to be one of the most fundamental algebraic objects. Consequently, the computation of a system of generators for the module of syzygies of a given tuple is one of the central problems in Computational Commutative Algebra. It is also the key to many applications studied in Chapter 3.

But for the moment, let us get down to earth and start digging for the hidden treasures in the land of syzygies. To find the set of all syzygies of a given tuple G = (g_{1}, …, g_{s}) of non-zero polynomial vectors g_{1}, …, g_{s} ∈ P^{r}, where P = K[x_{1}, …, x_{n}] is a polynomial ring over a field K, we use the same strategy which brought us rich rewards before: reduce questions about polynomials or vectors of polynomials to questions about their leading terms. Thus we start out by connecting the defining exact sequence of the module of syzygies Syz(G) of G and the defining exact sequence of Syz(LM_{σ}(G)), the syzygy module of LM_{σ}(G) = (LM_{σ}(g_{1}), …, LM_{σ}(g_{s})), via a fundamental diagram.

Then we compute an explicit system of generators for Syz(LM_{σ}(G)), and finally we try to lift those syzygies to syzygies of G. This means that we try to find syzygies of G whose highest homogeneous components (in some sense) are the syzygies generating Syz(LM_{σ}(G)). When we try to lift the treasures of syzygies in this way, we encounter another unexpected gem: A system of generators of a module has the property that the syzygies of their leading terms can be lifted if and only if the set of generators satisfies Conditions A), B), and C)!

Definition 2.3.1. Let R be a ring, M an R-module, and G = (g_{1}, …, g_{s}) a tuple of elements of M.

a) A syzygy of G is a tuple (f_{1}, …, f_{s}) ∈ R^{s} such that f_{1}g_{1}+⋯+f_{s}g_{s} = 0.

b) The set of all syzygies of G forms an R-module which we call the (first) syzygy module of G and which we denote by Syz_{R}(G) or by Syz_{R}(g_{1}, …, g_{s}). If no confusion can arise, we shall also write Syz(G) or Syz(g_{1}, …, g_{s}).

As in the previous sections, we let K be a field, n ≥ 1, P = K[x_{1}, …, x_{n}] a polynomial ring, r ≥ 1, and σ a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. Furthermore, we let g_{1}, …, g_{s} ∈ P^{r} \ {0}, we let M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}, and we denote the s-tuple (g_{1}, …, g_{s}) by G. Then we consider the P -module P^{s} with canonical basis {ε_{1}, …, ε_{s}} and the homomorphism λ : P^{s} ⟶ M given by ε_{j} ↦ g_{j} for j = 1, …, s. In this situation we can also describe the syzygy module of G by Syz_{P} (G) = ker(λ).

The nature of many facts explained in this section is not elementary, so the inexperienced reader might have some difficulties. For instance, it is clear that even if we start with an ideal, given by a set of polynomial generators, the set of their syzygies is a module. So the theory is described in the framework of modules. Moreover, we shall need to introduce a fine grading on the module of syzygies in order to detect the correct “highest homogeneous component” when we follow the above approach.

Since we do not want any reader running away from this book at this point, we decided to use a didactic tool: a running example. This is an example which we will revisit several times during the section, and which we will use to make all definitions and constructions as lucid as possible. Let us start our running example by introducing its basic objects.

Example 2.3.2. Let n = 3, let r = 1, and let us equip P = ℚ[x, y, z] with the degree-lexicographic term ordering σ. Then we consider the ideal M = ⟨g_{1}, g_{2}⟩ generated by g_{1} = x^{2} − y^{2} − x and g_{2} = xy^{2} − z^{3} , and the pair G = (g_{1}, g_{2}). Of course the reason why we call this ideal M (and not I) is to have a better way of comparing the example with the general theory.

The syzygy module of G is the submodule Syz(G) = {(f_{1}, f_{2}) ∈ P^{2} | f_{1}g_{1} +f_{2}g_{2} = 0} = {(f_{1}, f_{2}) ∈ P^{2} | f_{1}(x^{2} −y^{2} −x)+f_{2}(xy^{2} −z^{3}) = 0} of P^{2} . Some syzygies of G are obviously given by (g_{2}, −g_{1}) and its multiples, but are there others?

When we combine the exact sequence 0 ⟶ M ⟶ P^{r} ⟶ P^{r}/M ⟶ 0 with the description of Syz(G) as the kernel of λ, we obtain a long exact sequence

0 ⟶ Syz(G) ⟶ P^{s} ⟶^{λ} P^{r} ⟶ P^{r}/M ⟶ 0

Now let N ⊆ P^{r} be the P -submodule of P^{r} generated by the vectors {LM_{σ}(g_{1}), …, LM_{σ}(g_{s})}, let LM_{σ}(G) be the tuple (LM_{σ}(g_{1}), …, LM_{σ}(g_{s})), and let Λ : P^{s} ⟶ N denote the homomorphism given by ε_{j} ↦ LM_{σ}(g_{j}) for j = 1, …, s. Then Ker(Λ) is the syzygy module of LM_{σ}(G). Consequently, it will be denoted by Syz(LM_{σ}(G)). We obtain another long exact sequence

0 ⟶ Syz(LM_{σ}(G)) ⟶ P^{s} ⟶^{Λ} P^{r} ⟶ P^{r}/N ⟶ 0

Recall from Example 1.7.5 that P^{r} carries a natural structure of a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded module over the 𝕋^{n} -graded ring P. More precisely, we have (P^{r})_{te_{i}} = K · te_{i} and P_{t} = K · t for t ∈ 𝕋^{n} and i = 1, …, r. If we look at the definition of Λ, we see that Λ(∑_{j=1}^{s} f_{j}ε_{j}) = ∑_{j=1}^{s} f_{j} LM_{σ}(g_{j}). This fact suggests that we should try to equip the P -module P^{s} with a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-grading which is somehow compatible with Λ. By using this approach we find, in the next proposition, that the second sequence carries more structure than the first one.

Proposition 2.3.3. In the above situation we define

(P^{s})_{te_{i}} = { ∑_{j=1}^{s} c_{j}t_{j}ε_{j} ∈ P^{s} | c_{j} = 0 or t_{j} LT_{σ}(g_{j}) = te_{i} for j = 1, …, s}

for all te_{i} ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩.

a) We have P^{s} = ⊕_{te_{i}∈𝕋^{n}⟨e_{1},...,e_{r}⟩}(P^{s})_{te_{i}}. In this way, P^{s} becomes a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded module over the 𝕋^{n} -graded ring P.

b) The map Λ is a homomorphism of 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded P -modules. In fact, the sequence 0 ⟶ Syz(LM_{σ}(G)) ⟶ P^{s} ⟶^{Λ} P^{r} ⟶ P^{r}/N ⟶ 0 consists of homomorphisms of 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded modules.

Proof. In order to show a), we first observe that (P^{s})_{te_{i}} is a group for every t ∈ 𝕋^{n} and every i ∈ {1, …, r}. Then we verify P^{s} = ⊕_{te_{i}∈𝕋^{n}⟨e_{1},...,e_{r}⟩}(P^{s})_{te_{i}}. Every element ∑_{j=1}^{s} f_{j}ε_{j} ∈ P^{s} is a sum of elements of the form c t′ε_{j} with c ∈ K \ {0} and t′ ∈ 𝕋^{n}. By definition, we have c t′ε_{j} ∈ (P^{s})_{t′ LT_{σ}(g_{j})} , so that it remains to show that the sum is a direct sum.

To this end we notice that, for each j ∈ {1, …, s}, there exists at most one term t′ in the support of f_{j} such that t′ LT_{σ}(g_{j}) = te_{i}. Therefore every term in the support of ∑_{j=1}^{s} f_{j}ε_{j} is contained precisely in one summand (P^{s})_{te_{i}}. Finally, we observe that t · (P^{s})_{t′e_{i}} ⊆ (P^{s})_{tt′e_{i}} shows that our definition actually yields a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded module over the 𝕋^{n} -graded ring P.

Now we prove b). For every te_{i} ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ and every element ∑_{j=1}^{s} c_{j}t_{j}ε_{j} ∈ (P^{s})_{te_{i}} we have Λ(∑_{j=1}^{s} c_{j}t_{j}ε_{j}) = ∑_{j=1}^{s} c_{j}t_{j} LM_{σ}(g_{j}) = (∑_{j=1}^{s} c_{j})te_{i} ∈ (P^{r})_{te_{i}}. Therefore Λ is a homomorphism of 𝕋^{n}⟨e_{1}, …, e_{r}⟩- graded modules, and Syz(LM_{σ}(G)) = ker(Λ) inherits the structure of a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded module. Since N is a monomial submodule of P^{r}, it is a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded submodule by Proposition 1.7.10, and the canonical homomorphism P^{r} ⟶ P^{r}/N is a homomorphism of 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded P -modules by Remark 1.7.9. Thus the whole sequence consists of homomorphisms of 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded modules. □

Example 2.3.2 (continued) In our example we have LM_{σ}(G) = (x^{2}, xy^{2}). Then for instance (P^{2})_{x^{2}y^{2}} = {(c_{1}t_{1}, c_{2}t_{2}) ∈ P^{2} | c_{1}t_{1}x^{2}, c_{2}t_{2}xy^{2} ∈ ℚ · x^{2}y^{2}}. Examples of elements which belong to (P^{2})_{x^{2}y^{2}} are (y^{2}, 0), (−y^{2}, x), and (\frac{1}{2}y^{2}, −4x).

The intrinsic meaning of the new concepts which we are now going to introduce will be discussed more thoroughly in Volume 2. For the time being, they are only defined with the purpose of better dealing with the 𝕋^{n}⟨e_{1}, …, e_{r}⟩-gradings described above.

Definition 2.3.4. Let m be a non-zero element of a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded module, and let m = ∑_{μ∈𝕋^{n}⟨e_{1},...,e_{r}⟩} m_{μ} be the decomposition of m into its homogeneous components. The term max_{σ}{μ ∈ 𝕋^{n}⟨e_{1}, …, e_{r}⟩ | m_{μ} ≠ 0} is called the σ -degree of m, and the homogeneous component of m of this degree is called the σ -leading form of m.

In the case of the 𝕋^{n}⟨e_{1}, …, e_{r}⟩-grading on P^{s} defined in Proposition 2.3.3, we denote the σ -degree of an element m ∈ P^{s} \{0} by deg_{σ,G}(m), and its σ -leading form by LF_{σ,G}(m). In the next proposition we show how to determine deg_{σ,G}(m) and LF_{σ,G}(m) for a non-zero element m ∈ P^{s}.

Proposition 2.3.5. Let the module P^{s} be equipped with the 𝕋^{n}⟨e_{1}, …, e_{r}⟩- grading defined above, let f_{1}, …, f_{s} ∈ P, and let m = ∑_{j=1}^{s} f_{j}ε_{j} ∈ P^{s} \ {0}.

a) We have deg_{σ,G}(m) = max_{σ}{LT_{σ}(f_{j}g_{j}) | j ∈ {1, …, s}, f_{j}g_{j} ≠ 0}.

b) We have LF_{σ,G}(m) = ∑_{j=1}^{s} f̄_{j}ε_{j}, where

f̄_{j} = \{ \begin{matrix}0 & if f_{j} = 0 or LT_{σ}(f_{j}g_{j}) <_{σ} deg_{σ,G}(m) \\ c_{j}t_{j} & if LT_{σ}(f_{j}g_{j}) = deg_{σ,G}(m) and c_{j} ∈ K, t_{j} ∈ Supp(f_{j}) \\ & are such that LM_{σ}(f_{j}g_{j}) = c_{j}t_{j} LM_{σ}(g_{j}) \end{matrix}

Proof. Claim a) follows from Proposition 1.5.3 and Definition 2.3.4. To show b), we use that deg_{σ,G}(m) = max_{σ}{t LT_{σ}(g_{j}) | 1 ≤ j ≤ s, t ∈ Supp(f_{j})} by a), and this maximum is achieved precisely for the terms described in the formula. □

Sometimes we are dealing with the case r = 1, or we can pick a monoid ordering τ on 𝕋^{n} such that σ is compatible with τ. In this case, we have f̄_{j} = c_{j}t_{j} = LM_{τ} (f_{j}) in part b) of this proposition.

Example 2.3.2 (continued) Let us compute both the σ -degree and the σ -leading form of some elements of P^{s} in our running example. For instance, if we consider the pair (\frac{1}{2}y^{2}z, −4xz), we have deg_{σ,G}(\frac{1}{2}y^{2}z, −4xz) = x^{2}y^{2}z and LF_{σ,G}(\frac{1}{2}y^{2}z, −4xz) = (\frac{1}{2}y^{2}z, −4xz). Alternatively, if we start with the pair (y^{2}z −x, −4x^{2} −y −3) ∈ P^{2}, we get deg_{σ,G}(y^{2}z −x, −4x^{2} −y −3) = x^{3}y^{2} and LF_{σ,G}(y^{2}z − x, −4x^{2} − y − 3) = (0, −4x^{2}).

Our next goal is to connect the two long exact sequences constructed above. We define a map LM : P^{r} ⟶ P^{r}, which sends 0 to 0 and m to LM_{σ}(m) if m ≠ 0. Analogously we define a map LF : P^{s} ⟶ P^{s} which sends 0 to 0 and m to LF_{σ,G}(m) if m ≠ 0. In this way we get the following fundamental diagram.

0 ⟶  Syz(G)  ⟶ P^{s} ⟶^{λ} P^{r} ⟶ P^{r}/M ⟶ 0
↓^{LF}  ↓^{LM}
0 ⟶ Syz(LM_{σ}(G)) ⟶ P^{s} ⟶^{Λ} P^{r} ⟶ P^{r}/N ⟶ 0

This diagram suggests natural questions, for instance whether the vertical maps are homomorphisms (clearly they aren’t), and whether the diagram commutes (it doesn’t). A more precise answer to the second question is provided by our next proposition.

Proposition 2.3.6. In the situation described above, let m ∈ P^{s} \ Syz(G).

a) We have LT_{σ}(λ(m)) ≤_{σ} deg_{σ,G}(m).

b) We have LF(m) ∈ Syz(LM_{σ}(G)) if and only if LT_{σ}(λ(m)) <_{σ} deg_{σ,G}(m).

c) We have Λ(LF(m)) = LM(λ(m)) if and only if LT_{σ}(λ(m)) = deg_{σ,G}(m). Now, let m ∈ Syz(G) instead.

d) We have LF(m) ∈ Syz(LM_{σ}(G)). Therefore the map LF induces a map

LF |_{Syz(G)} : Syz(G) ⟶ Syz(LM_{σ}(G))

which we denote by LF again.

Proof. Claim a) follows from the rules for computing with leading terms (see Proposition 1.5.3) and from Proposition 2.3.5.a. Namely, for the element m = ∑_{j=1}^{s} f_{j}ε_{j} ∈ P^{s} \ {0} we calculate

LT_{σ}(λ(m)) = LT_{σ}( ∑_{j=1}^{s} f_{j}g_{j}) ≤_{σ} max_{σ}{LT_{σ}(f_{j}g_{j}) | j ∈ {1, …, s}, f_{j}g_{j} ≠ 0}
= deg_{σ,G}(m)

To prove b), we write m = ∑_{j=1}^{s} f_{j}ε_{j} ∈ P^{s} \ {0} and LF_{σ,G}(m) = ∑_{j=1}^{s} f̄_{j}ε_{j} as in Proposition 2.3.5. Then Λ(LF(m)) = ∑_{j=1}^{s} f̄_{j} LM_{σ}(g_{j}) = 0 is equivalent to the vanishing of the coefficient of deg_{σ,G}(m) in ∑_{j=1}^{s} f_{j}g_{j}, i.e. it is equivalent to LT_{σ}(λ(m)) <_{σ} deg_{σ,G}(m).

To prove c), we note that LT_{σ}(λ(m)) ≠ deg_{σ,G}(m) implies by a) and b) that we have Λ(LF(m)) = 0. Since λ(m) ≠ 0, we then get LM(λ(m)) = LM_{σ}(λ(m)) ≠ 0 = Λ(LF(m)). Conversely, if LT_{σ}(λ(m)) = deg_{σ,G}(m), then LM(λ(m)) = LM_{σ}(∑_{j=1}^{s} f_{j}g_{j}) = ∑_{{j|f̄_{j}≠0}} LM_{σ}(f_{j}g_{j}) = ∑_{j=1}^{s} f̄_{j} LM_{σ}(g_{j}) = Λ(LF(m)).

Finally we show claim d). Let m = ∑_{j=1}^{s} f_{j}ε_{j} ∈ Syz(G) \ {0}. Starting with λ(m) = 0, we get that the coefficient of deg_{σ,G}(m) in ∑_{j=1}^{s} f_{j}g_{j} vanishes, and hence ∑_{{j|f̄_{j}≠0}} LM_{σ}(f_{j}g_{j}) = ∑_{j=1}^{s} f̄_{j} LM_{σ}(g_{j}) = Λ(LF(m)) = 0.

□

Let us check the claims of this proposition in our running example.

Example 2.3.2 (continued) Recall that M = ⟨g_{1}, g_{2}⟩ is the ideal generated by g_{1} = x^{2} − y^{2} − x and g_{2} = xy^{2} − z^{3} , and that σ = DegLex.

a) The element m = (y^{2}, −x) of P^{2} satisfies λ(m) = y^{2}g_{1} − xg_{2} = −y^{4} − xy^{2} + xz^{3} , and thus deg_{σ,G}(m) = x^{2}y^{2} is not a scalar multiple of LM(λ(m)) = LM_{σ}(λ(m)) = xz^{3} . Going the other way in the fundamental diagram, we calculate LF(m) = (y^{2}, −x) and Λ(LF(m)) = y^{2} LM_{σ}(g_{1})−x LM_{σ}(g_{2}) = 0. In particular LF(m) ∈ Syz(LM_{σ}(G)). Here we have a case where LT_{σ}(λ(m)) <_{σ} deg_{σ,G}(m) and where LM(λ(m)) ≠ Λ(LF(m)).

b) The element m = (x, y) of P^{2} satisfies λ(m) = xg_{1} + yg_{2} = x^{3} − xy^{2} − x^{2} + xy^{3} − yz^{3} , and thus deg_{σ,G}(m) = xy^{3} as well as LM(λ(m)) = xy^{3} . On the other hand, we calculate LF(m) = (0, y) and Λ(LF(m)) = y LM_{σ}(g_{2}) = xy^{3} . Here we have a case where LT_{σ}(λ(m)) = deg_{σ,G}(m) and LM(λ(m)) = Λ(LF(m)).

In this example the element m = (y^{2}, −x) satisfies m ∉ Syz(G), whereas LF(m) ∈ Syz(LM_{σ}(G)). The fact that LF(m) is a syzygy of LM_{σ}(G) may be considered as a sort of first step in the construction of a syzygy of G. Thus a possible approach to our problem of computing a system of generators for Syz(G) could be to find elements which generate Syz(LM_{σ}(G)) and to “lift” them to elements of Syz(G) in some way. The remainder of this section is devoted to studying the feasibility of such an approach. As a first step we see how to obtain an explicit finite set of generators of Syz(LM_{σ}(G)).

Theorem 2.3.7. (Syzygies of Elements of Monomial Modules) For j = 1, …, s, we write LM_{σ}(g_{j}) in the form LM_{σ}(g_{j}) = c_{j}t_{j}e_{γ_{j}} with c_{j} ∈ K, t_{j} ∈ 𝕋^{n}, and γ_{j} ∈ {1, …, r}. For all i, j ∈ {1, …, s}, we define t_{ij} = \frac{lcm(t_{i},t_{j})}{t_{i}}.

a) For all i, j ∈ {1, …, s} such that i < j and γ_{i} = γ_{j}, the element σ_{ij} = \frac{1}{c_{i}} t_{ij}ε_{i} − \frac{1}{c_{j}} t_{ji}ε_{j} ∈ P^{s} is a syzygy of LM_{σ}(G) and is homogeneous of σ -degree deg_{σ,G}(σ_{ij}) = lcm(t_{i}, t_{j})e_{γ_{i}}.

b) We have

Syz(LM_{σ}(G)) = ⟨σ_{ij} | 1 ≤ i < j ≤ s, γ_{i} = γ_{j}⟩

In particular, Syz(LM_{σ}(G)) is a finitely generated 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded submodule of P^{s}.

Proof. To prove a), we note that Λ(σ_{ij}) = 0 and that

deg_{σ,G}(t_{ij}ε_{i}) = \frac{lcm(t_{i},t_{j})}{t_{i}} LT_{σ}(g_{i}) = lcm(t_{i}, t_{j})e_{γ_{i}}

= lcm(t_{i}, t_{j})e_{γ_{j}} = \frac{lcm(t_{i},t_{j})}{t_{j}} LT_{σ}(g_{j}) = deg_{σ,G}(t_{ji}ε_{j})

Now we prove b). In view of a), it is clear that Syz(LM_{σ}(G)) ≠ 0 if and only if there exist i, j ∈ {1, …, s} such that i < j and γ_{i} = γ_{j}. Since Λ is a homomorphism of 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded P -modules, its kernel is a 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded submodule of P^{s} and has a homogeneous system of generators. Let us consider one of those homogeneous generators and write it as m = ∑_{j=1}^{s} a_{j}t̄_{j}ε_{j} ∈ P^{s} \ {0} with a_{j} ∈ K and t̄_{j} ∈ 𝕋^{n}. There are an index μ ∈ {1, …, s} and a term t ∈ 𝕋^{n} such that t̄_{j} LT_{σ}(g_{j}) = te_{μ} whenever a_{j} ≠ 0, which is another way of saying that m is homogeneous and deg_{σ,G}(m) = te_{μ}. Next, let size(m) denote the cardinality of the set {i ∈ {1, …, s} | a_{i} ≠ 0}. Since Λ(m) = 0, we have ∑_{j=1}^{s} a_{j}c_{j} = 0, and since m ≠ 0, it follows that size(m) ≥ 2. Hence there are at least two indices α, β such that a_{α} ≠ 0 and a_{β} ≠ 0. From t = t̄_{α}t_{α} = t̄_{β}t_{β} we see that t is a multiple of lcm(t_{α}, t_{β}), hence

t̄_{α} = \frac{t}{t_{α}} = \frac{t}{lcm(t_{α},t_{β})}t_{αβ} and t̄_{β} = \frac{t}{t_{β}} = \frac{t}{lcm(t_{α},t_{β})}t_{βα}

We deduce that the syzygy \frac{t}{lcm(t_{α},t_{β})}σ_{αβ} has the same σ -degree as m. Moreover we see that if m′ = m − a_{α}c_{α} \frac{t}{lcm(t_{α},t_{β})}σ_{αβ}, then size(m′) < size(m). An obvious inductive argument concludes the proof. □

As an immediate consequence of the above theorem, it follows that there are no non-zero syzygies if γ_{i} ≠ γ_{j} for all 1 ≤ i < j ≤ s. This observation is amplified in Exercise 7. Clearly, the proof of the theorem can be used as an algorithm for computing the representation of an element of Syz(LM(G)) in terms of the generators σ_{ij}.

Example 2.3.8. Let n = 3, let r = 1, and let us equip P = ℚ[x, y, z] with the term ordering σ = DegRevLex. We consider the vector G = (g_{1}, g_{2}, g_{3}), where g_{1} = 4x^{2}y − x, g_{2} = 3xy^{3} , and g_{3} = yz − x − 1. Then we have LM_{σ}(G) = (4x^{2}y, 3xy^{3}, yz).

The module element m = (y^{2}z, −2xz, 2x^{2}y^{2}) = y^{2}zε_{1} − 2xzε_{2} + 2x^{2}y^{2}ε_{3} is contained in Syz(LM_{σ}(G)), since y^{2}z · 4x^{2}y − 2xz · 3xy^{3} + 2x^{2}y^{2} · yz = 0. Moreover, the element m is homogeneous of σ -degree deg_{σ,G}(m) = x^{2}y^{3}z, and we have size(m) = 3.

According to Theorem 2.3.7, we should be able to express m as a combination of σ_{12} , σ_{13} , and σ_{23} . Using the notation of the proof of the theorem, we see that a_{1}, a_{2}, a_{3} are different from zero. So, let α = 1 and β = 2. We get lcm(t_{1}, t_{2}) = x^{2}y^{3} , and therefore \frac{x^{2}y^{3}z}{lcm(t_{1},t_{2})} = \frac{x^{2}y^{3}z}{x^{2}y^{3}} = z.

Thus we form the element m′ = m − a_{1}c_{1} \frac{x^{2}y^{3}z}{lcm(t_{1},t_{2})}σ_{12} = m − 4zσ_{12} . Now we compute σ_{12} = \frac{1}{4}y^{2}ε_{1} − \frac{1}{3}xε_{2} = (\frac{1}{4}y^{2}, −\frac{1}{3}x, 0) and get m′ = (y^{2}z, −2xz, 2x^{2}y^{2}) − 4z(\frac{1}{4}y^{2}, −\frac{1}{3}x, 0) = (0, −\frac{2}{3}xz, 2x^{2}y^{2}). Finally, we determine σ_{23} = \frac{1}{3}zε_{2} − xy^{2}ε_{3} = (0, \frac{1}{3}z, −xy^{2}). It is clear that (0, −\frac{2}{3}xz, 2x^{2}y^{2}) = −2xσ_{23} . In conclusion, we find the desired representation m = 4zσ_{12}−2xσ_{23} .

The next steps in our program are to give a meaning to the process of “lifting” a syzygy of LM_{σ}(G) to a syzygy of G, and then to study whether such liftings can always be found.

Definition 2.3.9. An element m ∈ P^{s} is called a lifting of an element \overline{m} ∈ P^{s} if we have LF(m) = \overline{m}.

Proposition 2.3.10. The following conditions are equivalent. D_{1}) Every homogeneous element of Syz(LM_{σ}(G)) has a lifting in Syz(G). D_{2}) There exists a homogeneous system of generators of Syz(LM_{σ}(G)) con-

sisting entirely of elements which have a lifting in Syz(G). D_{3}) There exists a finite homogeneous system of generators of Syz(LM_{σ}(G))

consisting entirely of elements which have a lifting in Syz(G).

Proof. Since D_{1}) ⇒ D_{3}) as an immediate consequence of Theorem 2.3.7, and since D_{3}) ⇒ D_{2}) holds trivially, it suffices to prove that D_{1}) follows from D_{2}). Let I be a set, let \{\overline{m}_{i}\}_{i∈I} be a homogeneous system of generators of Syz(LM_{σ}(G)) indexed over I, and let m_{i} ∈ Syz(G) be a lifting of \overline{m}_{i} for every i ∈ I. Given a homogeneous element \overline{m} ∈ Syz(LT_{σ}(G)) \ \{0\}, there exists a natural number h such that we have \overline{m} = ∑_{j=1}^{h} c_{j}t_{j}\overline{m}_{i_{j}} with c_{j} ∈ K \ {0}, with t_{j} ∈ 𝕋^{n}, and with i_{j} ∈ I for j = 1, …, h. Clearly, we may assume deg_{σ,G}(t_{j}\overline{m}_{i_{j}}) = deg_{σ,G}(\overline{m}) for j = 1, …, h. From the fact that LF(t_{j}m_{i_{j}}) = t_{j}\overline{m}_{i_{j}} we conclude deg_{σ,G}(t_{j}m_{i_{j}}) = deg_{σ,G}(\overline{m}). This, in turn, implies LF(∑_{j=1}^{h} c_{j}t_{j}m_{i_{j}}) = ∑_{j=1}^{h} c_{j}t_{j}\overline{m}_{i_{j}} = \overline{m}, which concludes the proof.

□

If we want to find all elements of Syz(G) using this process of lifting, we need to ascertain that there exists a system of generators of Syz(G) consisting of liftings. This is achieved by the following proposition whose proof demonstrates once more the power of term orderings.

Proposition 2.3.11. Let \{\overline{m}_{1}, …, \overline{m}_{t}\} be a homogeneous system of generators of the module Syz(LM_{σ}(G)), and let m_{1}, …, m_{t} ∈ Syz(G) be elements such that LF(m_{i}) = \overline{m}_{i} for i = 1, …, t. Then \{m_{1}, …, m_{t}\} is a system of generators of Syz(G).

Proof. For contradiction we assume that the subset S of Syz(G) of syzygies which are not generated by {m_{1}, …, m_{t}} is not empty. By the fundamental property of term orderings (see Theorem 1.4.19), there exists m ∈ S with minimal deg_{σ,G}. Then there exists a natural number h such that we have LF(m) = ∑_{j=1}^{h} c_{j}t_{j}\overline{m}_{i_{j}} with c_{j} ∈ K \ \{0\}, with t_{j} ∈ 𝕋^{n}, and with i_{j} ∈ {1, …, t} for j = 1, …, h. The element m′ = m−∑_{i=1}^{h} c_{i}t_{i}m_{i_{j}} satisfies either m′ = 0 or deg_{σ,G}(m′) <_{σ} deg_{σ,G}(m). In both cases we get a contradiction, and the proof is complete. □

The final proposition in this section is the gem we promised in the introduction.

Proposition 2.3.12. Let g_{1}, …, g_{s} ∈ P^{r} \ {0} and M = ⟨g_{1}, …, g_{s}⟩. Then Conditions A_{1}), A_{2}) of Proposition 2.1.1 and Conditions D_{1}), D_{2}), D_{3}) of Proposition 2.3.10 are equivalent.

Proof. First we show that Condition A_{2}) implies D_{1}). Let m = ∑_{j=1}^{s} f_{j}ε_{j} be a non-zero homogeneous element of Syz(LM_{σ}(G)). We may suppose that λ(m) ≠ 0, since in case λ(m) = 0 we have m ∈ Syz(G) and LF(m) = m, i.e. the element m is a lifting of itself. By Condition A_{2}), the element λ(m) has a representation λ(m) = ∑_{i=1}^{s} h_{i}g_{i} with polynomials h_{1}, …, h_{s} ∈ P such that LT_{σ}(λ(m)) = max_{σ}{LT_{σ}(h_{i}g_{i}) | i ∈ {1, …, s}, h_{i}g_{i} ≠ 0}. Now we consider the element h = ∑_{j=1}^{s} h_{j}ε_{j} ∈ P^{s}. We have m − h ∈ Syz(G) and LT_{σ}(λ(m)) = LT_{σ}(λ(h)) = deg_{σ,G}(h). On the other hand, since LF(m) = m and Λ(LF(m)) = 0, Proposition 2.3.6.b yields LT_{σ}(λ(m)) <_{σ} deg_{σ,G}(m). Altogether, we get deg_{σ,G}(m) >_{σ} deg_{σ,G}(h) and LF(m − h) = LF(m) = m. Thus the element m − h is a lifting of m.

Now let us show the reverse implication. We assume for contradiction that there exists an element v ∈ M \{0} which cannot be represented as requested by Condition A_{2}). We observe that if v = ∑_{i=1}^{s} f_{i}g_{i} for some polynomials f_{1}, …, f_{s} ∈ P and if m = ∑_{j=1}^{s} f_{j}ε_{j}, then we have v = λ(m). In other words, the element m is a preimage of v under λ. By the fundamental property of term orderings (see Theorem 1.4.19), we know that among all preimages of v under λ, there exists one preimage m with minimal deg_{σ,G}(m). We cannot have deg_{σ,G}(m) = LT_{σ}(v), because otherwise the representation v = ∑_{i=1}^{s} f_{i}g_{i} is already of the form required by Condition A_{2}). Therefore Proposition 2.3.6.a shows that we must have LT_{σ}(v) <_{σ} deg_{σ,G}(m). Next, Proposition 2.3.6.b yields LF(m) ∈ Syz(LM_{σ}(G)). Thus Condition D_{1}) gives us an element m′ = ∑_{j=1}^{s} f′_{j}ε_{j} ∈ Syz(G) such that LF(m′) = LF(m). In particular, this means that deg_{σ,G}(m − m′) <_{σ} deg_{σ,G}(m) and λ(m − m′) = λ(m) = v, which contradicts the minimality of the σ -degree of m. □

Exercise 1. Find a term ordering σ and elements g_{1}, …, g_{s} ∈ P^{r} \ {0} which generate a submodule M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r} such that Conditions D_{1}), D_{2}), and D_{3}) are not satisfied.

Exercise 2. Find a 2 × 3-matrix over P = K[x, y, z] whose associated ideal of 2 × 2-minors is generated by {x^{2} − y, xy − z, y^{2} − xz}. By adding suitable rows to this matrix, show how one can produce non-trivial syzygies of the triple G = (x^{2} − y, xy − z, y^{2} − xz).

Exercise 3. In the case n = 2, P = ℚ[x, y], r = 2, compute a system of generators of the syzygy module of the tuple G = ((xy + y, x), (x − y, y), (x, x + y), (−x, y)) by hand.

Exercise 4. Let P = K[x, y, z] be a polynomial ring over a field K, let r = 1, and let G = (x, y, z). Compute the syzygy module of a set of generators of Syz_{P} (G).

Exercise 5. Give a direct proof for the fact that Condition D_{1}) of Proposition 2.3.10 implies Condition B_{2}) of Proposition 2.1.2. Hint: If m ∈ M \ {0} has a leading term outside N, pick a preimage of m under λ of smallest σ -degree and look at the fundamental diagram.

Exercise 6. Let g_{1}, …, g_{s} ∈ P^{r} \ {0}, let M = ⟨g_{1}, …, g_{s}⟩, and let G be the tuple (g_{1}, …, g_{s}).

a) Prove that Syz(G) = 0 if and only if M is a free P -module with basis {g_{1}, …, g_{s}}.

b) Let s = 3, let n = 3, let r = 2, let g_{1} = (x^{2}, x − y), let g_{2} = (0, y), and let g_{3} = (xy, z). Then show that Syz(G) ≠ 0.

Exercise 7. Let g_{1}, …, g_{s} ∈ P^{r} \ {0}, let M = ⟨g_{1}, …, g_{s}⟩, let G be the s-tuple (g_{1}, …, g_{s}), let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, and let LT_{σ}(g_{i}) = t_{i}e_{γ_{i}} with t_{i} ∈ 𝕋^{n} and γ_{i} ∈ {1, …, r} for i = 1, …, s.

a) Prove that M is a free P -module if γ_{i} ≠ γ_{j} for all i ≠ j.

b) Deduce that the submodule of P^{3} generated by the set of vectors {(x, y − z, x), (z, y^{2} − x, x), (z^{2} − y + 1, y^{2} − x, x − 3)} is free.

Tutorial 19: Syzygies of Elements of Monomial Modules

Let K be a field, n ≥ 1, P = K[x_{1}, …, x_{n}], r ≥ 1, and M ⊆ P^{r} a monomial submodule generated by {t_{1}e_{γ_{1}}, …, t_{s}e_{γ_{s}}}, where t_{1}, …, t_{s} ∈ 𝕋^{n} and γ_{1}, …, γ_{s} ∈ {1, …, r}.

a) Use Theorem 2.3.7 to give an explicit system of generators of the syzygy module of (t_{1}e_{γ_{1}}, …, t_{s}e_{γ_{s}}). Write a CoCoA function MonomialSyz(…) which takes a system of generators of a monomial module M as above and computes its first syzygy module.

b) Show by example that the system of generators of the syzygy module given in a) is in general not minimal, even if {t_{1}e_{γ_{1}}, …, t_{s}e_{γ_{s}}} is minimal.

c) Apply your function MonomialSyz(…) to compute the syzygy modules of the following tuples.

1) (x^{34}y^{7}, x^{23}y^{19}) ⊆ ℚ[x, y]^{2}

2) (x, y, z) ⊆ ℚ[x, y, z]^{3}

3) (xy, yz, xz) ⊆ ℚ[x, y, z]^{3}

4) (xe_{1}, ye_{1}, ye_{2}, ze_{2}, xe_{3}, ze_{3}) ⊆ (ℚ[x, y, z]^{3})^{6}

d) Show that if r = 1, 1 ≤ i < j < k ≤ s, and t_{k} divides lcm(t_{i}, t_{j}), then the syzygy σ_{ij} (as defined in Theorem 2.3.7) is in the module generated by σ_{ik} and σ_{jk}.

e) Write an improved version MonomialIdealSyz(…) of your program from a) which works for systems of generators of monomial ideals and takes the optimization of part d) into account.

f) Apply the function MonomialIdealSyz(…) in the appropriate cases of c). Each time, try to determine whether the computed system of generators of the syzygy module is minimal.

Tutorial 20: Lifting of Syzygies

In this tutorial we shall try to program the lifting of syzygies discussed in the last part of the current section. As usual, let K be a field, let n ≥ 1, let P = K[x_{1}, …, x_{n}] be a polynomial ring, let r ≥ 1, let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, let G = (g_{1}, …, g_{s}) ∈ (P^{r})^{s} be a tuple of non-zero vectors, and let M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}. We assume that Conditions D_{1}), D_{2}), and D_{3}) are satisfied. For i = 1, …, s, we write LT_{σ}(g_{i}) = t_{i}e_{γ_{i}} with t_{i} ∈ 𝕋^{n} and 1 ≤ γ_{i} ≤ r, and, for i, j ∈ {1, …, s} such that γ_{i} = γ_{j}, we let t_{ij} = lcm(t_{i}, t_{j})/t_{i} = t_{j}/ gcd(t_{i}, t_{j}).

a) Show that, for 1 ≤ i < j ≤ s such that γ_{i} = γ_{j}, there are representations

LC_{σ}(g_{i})^{−1}t_{ij}g_{i} − LC_{σ}(g_{j})^{−1}t_{ji}g_{j} = ∑_{k=1}^{s} f_{ijk}g_{k}

where f_{ij1}, …, f_{ijs} ∈ P, and where LT_{σ}(f_{ijk}g_{k}) <_{σ} LT_{σ}(t_{ij}g_{i}) for all k ∈ {1, …, s} such that f_{ijk} ≠ 0.

b) Let {σ_{ij} | 1 ≤ i < j ≤ s, γ_{i} = γ_{j}} be the system of generators of the kernel of the map Λ : P^{s} ⟶ P^{r}, e_{i} ⟼ LM_{σ}(g_{i}) introduced in Theorem 2.3.7. Prove that the elements s_{ij} = σ_{ij} − ∑_{k=1}^{s} f_{ijk}ε_{j} are liftings of σ_{ij} for all i, j as above.

c) Conclude that the set {s_{ij} | 1 ≤ i < j ≤ s, γ_{i} = γ_{j}} is a system of generators of the syzygy module Syz(G).

d) Using the program Division(…) from Tutorial 14 as a subfunction, write a CoCoA program StdRepr(…) which takes the tuple G and indices i, j as above and computes a list of polynomials [f_{ij1}, …, f_{ijs}] corresponding to the representation in a).

e) Using the program MonomialSyz(…) from Tutorial 19 and StdRepr(…) as subfunctions, write a CoCoA program LiftSyz(…) which takes the tuple G and computes the list of all syzygies s_{ij} as in b).

f) Using the module term ordering DegRevLexPos, compute the lists of all syzygies σ_{ij} and all s_{ij} in the following cases.

1) G = (x_{1}^{2} − x_{2}, x_{2}^{2} − x_{3}, x_{3}^{2} − x_{1}) ∈ ℚ[x_{1}, x_{2}, x_{3}]^{3}

2) G = (x_{1}e_{1}, x_{2}e_{1}, x_{3}e_{2}, x_{1}e_{3}) ∈ (ℚ[x_{1}, x_{2}, x_{3}]^{3})^{4}

3) G = (x_{1}x_{4}−x_{2}x_{3}, x_{1}x_{3}^{2}−x_{2}^{2}x_{4}, x_{1}^{2}x_{3}−x_{2}^{3}, x_{2}x_{4}^{2}−x_{3}^{3}) ∈ ℚ[x_{1}, x_{2}, x_{3}, x_{4}]^{4}

2.4 Gröbner Bases of Ideals and Modules

The motifs of a combination, in themselves simple, are often interwoven with each other. [...] The idea which links the motifs is artistic,

it creates something that had never before been there. (Emanuel Lasker)

In the previous three sections we saw many conditions arising from a number of different motifs, and all of them turned out to be equivalent. Whenever such a phenomenon shows up, it is clear that something very important is going on: there must be some fundamental idea behind the scene which needs to be brought to center stage. In our case it is the notion of a Gröbner basis. It is one of those rare notions in the history of modern mathematics which was able to deviate the main stream of events. It became a fundamental tool, both for its theoretical and practical consequences.

The section opens by linking the different motifs studied before through the idea of a Gröbner basis. The natural search for the existence of such objects leads to a fairly easy positive answer (see Proposition 2.4.3). Part of this existence result is Hilbert’s Basis Theorem 2.4.6 for finitely generated modules over finitely generated K -algebras. Of course it is not necessary to develop the theory of Gröbner bases to achieve that result, but we decided to include it here as an application in order to highlight the theoretical power of Gröbner bases.

Then we become more ambitious and try to solve the problem of computing in residue class modules. Using a Gröbner basis, we define the normal form of an element with respect to a submodule and show that it is independent of the Gröbner basis chosen. It agrees with the normal remainder given by the Division Algorithm 1.6.4. Thus it is a unique representative of the residue class of the given element which can be computed by performing the Division Algorithm with respect to any Gröbner basis of the submodule. Consequently, we get a submodule membership test, also called ideal membership test when r = 1, and a new formulation of Macaulay’s Basis Theorem.

But what is really striking is another form of uniqueness. In our opinion, it is one of the most important theoretical results of this theory. Given a Gröbner basis of a submodule M of P^{r}, we can modify its elements in such a way that we get another Gröbner basis with the extra properties of being monic, minimal, and interreduced. Surprisingly, this reduced Gröbner basis of M depends only on the module and the chosen term ordering. As we shall see, the possibility of representing a submodule by a unique system of generators has numerous theoretical and practical applications. To give a first support to this claim, we devote the last part of this section to the proof of the existence and uniqueness of the field of definition of a given submodule M, i.e. a minimal subfield of K which contains the coefficients of some system of generators of M.

Now we start the main part of this section by recalling that, as usual, we let K be a field, n ≥ 1, P = K[x_{1}, …, x_{n}] a polynomial ring, r ≥ 1, and σ a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. In the following theorem we collect all the conditions studied in the previous sections.

Theorem 2.4.1. (Characterization of Gröbner Bases) For a set of elements G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0} which generates a submodule M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}, let ⟶^{G} be the rewrite rule defined by G, let G be the tuple (g_{1}, …, g_{s}), let λ be the map λ : P^{s} ⟶ P^{r} defined by ε_{i} ↦ g_{i}, and let Λ : P^{s} ⟶ P^{r} be the map defined by ε_{i} ↦ LM_{σ}(g_{i}). Then the following conditions are equivalent. A_{1}) For every element m ∈ M \ {0}, there are f_{1}, …, f_{s} ∈ P such that

m = ∑_{i=1}^{s} f_{i}g_{i} and LT_{σ}(m) ≥_{σ} LT_{σ}(f_{i}g_{i}) for all i = 1, …, s such that

f_{i}g_{i} ≠ 0, i.e. such that LT_{σ}(m) ≥_{σ} deg_{σ,G}(∑_{i=1}^{s} f_{i}ε_{i}).

A_{2}) For every element m ∈ M \{0}, there are f_{1}, …, f_{s} ∈ P such that m = ∑_{i=1}^{s} f_{i}g_{i} and LT_{σ}(m) = max_{σ}{LT_{σ}(f_{i}g_{i}) | i ∈ {1, …, s}, f_{i}g_{i} ≠ 0},

i.e. such that LT_{σ}(m) = deg_{σ,G}(∑_{i=1}^{s} f_{i}ε_{i}).

B_{1}) The set {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})} generates the 𝕋^{n}-monomodule LT_{σ}{M}. B_{2}) The set {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})} generates the P -submodule LT_{σ}(M)

of P^{r}.

C_{1}) For an element m ∈ P^{r}, we have m ⟶^{G} 0 if and only if m ∈ M.

C_{2}) If m ∈ M is irreducible with respect to ⟶^{G}, then we have m = 0. C_{3}) For every element m_{1} ∈ P^{r}, there is a unique element m_{2} ∈ P^{r} such

that m_{1} ⟶^{G} m_{2} and m_{2} is irreducible with respect to ⟶^{G}.

C_{4}) If m_{1}, m_{2}, m_{3} ∈ P^{r} satisfy m_{1} ⟶^{G} m_{2} and m_{1} ⟶^{G} m_{3} , then there exists

an element m_{4} ∈ P^{r} such that m_{2} ⟶^{G} m_{4} and m_{3} ⟶^{G} m_{4} . D_{1}) Every homogeneous element of Syz(LM_{σ}(G)) has a lifting in Syz(G). D_{2}) There exists a homogeneous system of generators of Syz(LM_{σ}(G)) con-

sisting entirely of elements which have a lifting in Syz(G). D_{3}) There exists a finite homogeneous system of generators of Syz(LM_{σ}(G))

consisting entirely of elements which have a lifting in Syz(G).

Proof. This follows from Propositions 2.1.3, 2.2.8, and 2.3.12. □

Definition 2.4.2. Let G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0} be a set of elements which generates a submodule M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}. If the conditions of Theorem 2.4.1 are satisfied, then G is called a Gröbner basis of M with respect to σ or a σ -Gröbner basis of M. In the case M = ⟨0⟩, we shall say that G = ∅ is a σ -Gröbner basis of M.

2.4.A Existence of Gröbner Bases

Our first task is to show the existence of Gröbner bases. If we recall Proposition 1.5.6.b, it is clear that there are elements g_{1}, …, g_{s} ∈ M satisfying Condition B_{2}). But do they generate M? Our next proposition answers this question affirmatively.

Proposition 2.4.3. (Existence of a σ -Gröbner Basis) Let M be a non-zero P -submodule of P^{r}.

a) Given g_{1}, …, g_{s} ∈ M \{0} such that LT_{σ}(M) = ⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{s})⟩, we have M = ⟨g_{1}, …, g_{s}⟩, and the set G = {g_{1}, …, g_{s}} is a σ -Gröbner basis of M.

b) The module M has a σ -Gröbner basis G = {g_{1}, …, g_{s}} ⊆ M \ {0}.

Proof. First we show claim a) by contradiction. Suppose ⟨g_{1}, …, g_{s}⟩ ⊂ M. By Theorem 1.4.19, there exists an element m ∈ M \ ⟨g_{1}, …, g_{s}⟩ whose leading term LT_{σ}(m) is minimal with respect to σ among all elements of that set. Since we have LT_{σ}(m) ∈ LT_{σ}(M) = ⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{s})⟩, there are c ∈ K \{0}, t ∈ 𝕋^{n}, and i ∈ {1, …, s} such that LM_{σ}(m) = c t LM_{σ}(g_{i}). Thus we get LT_{σ}(m − c t g_{i}) <_{σ} LT_{σ}(m), and hence m − c t g_{i} ∈ ⟨g_{1}, …, g_{s}⟩, contradicting m ∉ ⟨g_{1}, …, g_{s}⟩.

Claim b) follows from a) using Proposition 1.5.6.b. □

The existence of Gröbner bases implies one of the most important properties of polynomial rings over fields. In Section 1.3 we described the property of being Noetherian in the case of monoideals. Using a similar formulation, we extend it to ideals and modules.

Definition 2.4.4. A ring (resp. module) is called Noetherian if every ascending chain of ideals (resp. submodules) becomes eventually stationary.

The following characterizations of Noetherian modules are in complete analogy with the case of Noetherian monoids and can be shown exactly as Proposition 1.3.4.

Proposition 2.4.5. Let R be a ring and M an R-module. The following conditions are equivalent.

a) Every submodule of M is finitely generated.

b) Every ascending chain N_{1} ⊆ N_{2} ⊆ ⋯ of submodules of M is eventually stationary.

c) Every non-empty set of submodules of M has a maximal element (with respect to inclusion).

As a consequence of Proposition 2.4.3, we obtain a version of Hilbert’s Basis Theorem for finitely generated modules over finitely generated K - algebras.

Theorem 2.4.6. (Hilbert’s Basis Theorem) Every finitely generated module over a finitely generated K -algebra is Noetherian. In particular, P = K[x_{1}, …, x_{n}] is a Noetherian ring.

Proof. If we represent the K -algebra in the form P/I with a polynomial ring P = K[x_{1}, …, x_{n}] and an ideal I ⊆ P, we can view the module M as a finitely generated P -module via the canonical map P −↠ P/I. Obviously it suffices to show that every P -submodule of M is finitely generated. Since M is finitely generated, we can represent M in the form M = P^{r}/U with r ≥ 1 and a submodule U ⊆ P^{r}. Since every submodule of M is of the form N/U with a submodule N ⊆ P^{r}, it suffices to show that every P -sub-module of P^{r} is finitely generated, and this is an immediate consequence of Proposition 2.4.3. □

2.4.B Normal Forms

Our next application of Gröbner bases is to show how they help us to perform effective calculations in a residue class module P^{r}/M. Several attempts to solve this question have failed so far, because we were not able to find a unique representative in P^{r} for a residue class in P^{r}/M. Using a Gröbner basis, we now find that all those attempts lead to the same unique answer.

Let G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0} be a σ -Gröbner basis of M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}, and let m ∈ P^{r}. By Condition C_{3}), there exists a unique element m_{G} ∈ P^{r} such that m ⟶^{G} m_{G} and such that m_{G} is irreducible with respect to ⟶^{G}. A priori this element seems to depend on the Gröbner basis chosen, but indeed it does not, as the following proposition shows.

Proposition 2.4.7. In the above situation, m_{G} is the unique element of P^{r} with the properties that m − m_{G} ∈ M and Supp(m_{G}) ∩ LT_{σ}{M} = ∅. In particular, it does not depend on the particular σ -Gröbner basis chosen.

Proof. We know that m − m_{G} ∈ M and that the support of m_{G} does not intersect LT_{σ}{M}. Uniqueness follows from the observation that, for two such elements m_{G} and m_{H}, the support of m_{G}−m_{H} ∈ M does not intersect LT_{σ}{M}, and this is, by Condition C_{2}), only possible if m_{G} − m_{H} = 0. □

Definition 2.4.8. Let M ⊆ P^{r} be a non-zero module, and let m ∈ P^{r}. The element m_{G} ∈ P^{r} described above is called the normal form of m with respect to σ. It is denoted by NF_{σ,M}(m), or simply by NF_{σ}(m) if it is clear which submodule is considered.

Below we collect some properties of normal forms. In particular, we see that the Division Algorithm with respect to a Gröbner basis provides an effective method for computing normal forms.

Corollary 2.4.9. In the above situation, let G = (g_{1}, …, g_{s}).

a) If m ∈ P^{r}, then NR_{σ,G}(m) agrees with NF_{σ}(m). In particular, the normal remainder does not depend on the order of the elements g_{1}, …, g_{s}.

b) For m_{1}, m_{2} ∈ P^{r}, we have NF_{σ}(m_{1} − m_{2}) = NF_{σ}(m_{1}) − NF_{σ}(m_{2}).

c) For m ∈ P^{r}, we have NF_{σ}(NF_{σ}(m)) = NF_{σ}(m).

Proof. Claim a) follows from m−NR_{σ,G}(m) ∈ M and from the fact that the support of NR_{σ,G}(m) does not meet LT_{σ}{M}. Next we show b). We have m_{1} −m_{2} −(NF_{σ}(m_{1})−NF_{σ}(m_{2})) = (m_{1} −NF_{σ}(m_{1}))−(m_{2} −NF_{σ}(m_{2})) ∈ M and NF_{σ}(m_{1}) − NF_{σ}(m_{2}) is irreducible with respect to ⟶^{G}. The uniqueness of such an element yields the conclusion. Claim c) follows similarly, because NF_{σ}(m)−NF_{σ}(m) = 0 ∈ M and NF_{σ}(m) is irreducible with respect to ⟶^{G}.

□

For the purposes of actual computations, one of the most useful applications of normal forms is the possibility to check whether an element is contained in a submodule or whether one submodule is contained in another.

Proposition 2.4.10. (Submodule Membership Test) Let {g_{1}, …, g_{s}} ⊆ P^{r} generate a P -submodule M = ⟨g_{1}, …, g_{s}⟩ of P^{r}, and let {h_{1}, …, h_{t}} ⊆ P^{r} generate a P -submodule N = ⟨h_{1}, …, h_{t}⟩ ⊆ P^{r}.

a) For m_{1}, m_{2} ∈ P^{r}, we have m_{1} − m_{2} ∈ M if and only if NF_{σ,M}(m_{1}) = NF_{σ,M}(m_{2}). In particular, an element m ∈ P^{r} satisfies m ∈ M if and only if NF_{σ,M}(m) = 0.

b) We have N ⊆ M if and only if NF_{σ,M}(h_{i}) = 0 for i = 1, …, t.

c) The condition M = N is equivalent to NF_{σ,N}(g_{i}) = NF_{σ,M}(h_{j}) = 0 for i = 1, …, s and j = 1, …, t.

d) If N ⊆ M and LT_{σ}{M} ⊆ LT_{σ}{N}, then M = N.

Proof. To show the first claim, let m_{1}, m_{2} ∈ P^{r} such that m_{1} − m_{2} ∈ M. Then 0 = NF_{σ,M}(m_{1}−m_{2}) = NF_{σ,M}(m_{1})−NF_{σ,M}(m_{2}) by Corollary 2.4.9.b. Conversely, let NF_{σ,M}(m_{1}) = NF_{σ,M}(m_{2}). In this case, the claim follows from m_{1} − m_{2} = (m_{1} − NF_{σ,M}(m_{1})) − (m_{2} − NF_{σ,M}(m_{2})) ∈ M.

Clearly, claim b) is a consequence of a), and claim c) follows from b). Thus it remains to prove claim d). Since we have N ⊆ M, it is clear that LT_{σ}{N} ⊆ LT_{σ}{M}. Thus the hypothesis that we have the other inclusion LT_{σ}{M} ⊆ LT_{σ}{N} implies equality LT_{σ}{N} = LT_{σ}{M}. Now take an element m ∈ M. We have Supp(NF_{σ,N}(m)) ∩ LT_{σ}{N} = ∅, and therefore Supp(NF_{σ,N}(m)) ∩ LT_{σ}{M} = ∅. The uniqueness in Proposition 2.4.7 shows that NF_{σ,N}(m) = 0, i.e. we get m ∈ N. □

As an important application of the notion of Gröbner basis, we get a new version of Macaulay’s Basis Theorem 1.5.7.

Corollary 2.4.11. (New Version of Macaulay’s Basis Theorem) Let M ⊆ P^{r} be a P -submodule, let G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0} be a σ -Gröbner basis of M, and let B be the set of all terms in 𝕋^{n}⟨e_{1}, …, e_{r}⟩ which are not a multiple of any term in the set {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})}. Then the residue classes of the elements of B form a K -basis of P^{r}/M.

Proof. The fact that G is a σ -Gröbner basis of M implies that LT_{σ}{M} is generated by {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})} by Condition B_{1}) of Theorem 2.4.1. So the statement follows immediately from Theorem 1.5.7. □

2.4.C Reduced Gröbner Bases

In the last part of this section we address the question of uniqueness of Gröbner bases and provide an application of it. Given a module term ordering σ, a submodule M ⊆ P^{r} has many σ -Gröbner bases. For instance, we can add arbitrary elements of M to a σ -Gröbner basis and it remains a σ -Gröbner basis of M. However, there is a unique one which satisfies the following additional conditions.

Definition 2.4.12. Let G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0} and M = ⟨g_{1}, …, g_{s}⟩. We say that G is a reduced σ -Gröbner basis of M if the following conditions are satisfied.

a) For i = 1, …, s, we have LC_{σ}(g_{i}) = 1.

b) The set {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})} is a minimal system of generators of LT_{σ}(M).

c) For i = 1, …, s, we have Supp(g_{i} − LT_{σ}(g_{i})) ∩ LT_{σ}{M} = ∅.

Theorem 2.4.13. (Existence and Uniqueness of Reduced Gröbner Bases) For every P -submodule M ⊆ P^{r}, there exists a unique reduced σ -Gröbner basis.

Proof. We start by proving existence. Let G = {g_{1}, …, g_{s}} be any σ - Gröbner basis of M. If we replace g_{i} by LC_{σ}(g_{i})^{−1}g_{i} for i = 1, …, s, we obtain a Gröbner basis with property a). By Condition B_{2}) of Theorem 2.4.1, the monomial module LT_{σ}(M) is generated by {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})}. Then we use Proposition 1.3.11.b to get from this set the unique minimal system of generators of LT_{σ}(M). After possibly renumbering the vectors we may assume that this minimal system of generators is {LT_{σ}(g_{1}), …, LT_{σ}(g_{t})}, where t ≤ s. And using again Condition B_{2}) and Proposition 2.4.3.a, we see that the set G′ = {g_{1}, …, g_{t}} is a σ -Gröbner basis of M which satisfies conditions a) and b) of the definition.

Now we write g_{i} = LT_{σ}(g_{i}) + h_{i}, and if we let g′_{i} = LT_{σ}(g_{i}) + NF_{σ}(h_{i}) for i = 1, …, t, we can form the set G′′ = {g′_{1}, …, g′_{t}}. We claim that G′′ is a reduced σ -Gröbner basis of M. Since g′_{i} = g_{i} − (h_{i} − NF_{σ}(h_{i})), we use Proposition 2.4.7 and get g′_{i} ∈ M for i = 1, …, t. By Condition B_{2}), the set G′′ is a σ -Gröbner basis of M. Since it clearly satisfies conditions a) and b) of the definition, it remains to prove that it also satisfies condition c). Indeed, for every i ∈ {1, …, t}, no term in Supp(NF_{σ}(h_{i})) lies in LT_{σ}{M},

because NF_{σ}(h_{i}) is irreducible with respect to ⟶^{G′}.

Finally, to show uniqueness, we assume that G = {g_{1}, …, g_{s}} and H = {h_{1}, …, h_{t}} are two reduced σ -Gröbner bases of M. From the fact that the minimal monomial system of generators of a monomial module is unique (see Proposition 1.3.11.b), we conclude s = t and that we can renumber the elements of H such that LT_{σ}(g_{i}) = LT_{σ}(h_{i}) for i = 1, …, s. Moreover, for i = 1, …, s, we have g_{i} − h_{i} ∈ M, and g_{i} − h_{i} is, by condition c) of the definition, irreducible with respect to ⟶^{G}. Thus property C_{2}) of Theorem 2.4.1 proves g_{i} = h_{i} for i = 1, …, s. □

As an application of the existence and uniqueness of reduced σ -Gröbner bases we can show the existence and uniqueness of a field of definition for submodules of P^{r}.

Definition 2.4.14. Let K be a field, P = K[x_{1}, …, x_{n}] a polynomial ring, and M ⊆ P^{r} a P -submodule.

a) Let k ⊆ K be a subfield. We say that M is defined over k if there exist elements in k[x_{1}, …, x_{n}]^{r} which generate M as a P -module.

b) A subfield k ⊆ K is called a field of definition of M if M is defined over k and there exists no proper subfield k′ ⊂ k such that M is defined over k′.

It is clear that if a field of definition of a P -submodule M ⊆ P^{r} exists, it has to contain the prime field of K. Let us look at a concrete example.

Example 2.4.15. Let I ⊆ ℂ[x_{1}, x_{2}, x_{3}] be the ideal generated by the set \{x_{1}^{2} − \sqrt{5}x_{1}x_{2} + 3x_{1}x_{3} + 2\sqrt{5}x_{3}^{2}, x_{1}x_{2} − \sqrt{2}x_{3}^{2}, 2x_{1}x_{2} + \sqrt{3}x_{3}^{2}\}. Obviously, the ideal I is defined over ℚ[\sqrt{2}, \sqrt{3}, \sqrt{5}].

But it is also easy to check that I = (x_{1}^{2} + 3x_{1}x_{3}, x_{1}x_{2}, x_{3}^{2}). Therefore, the ideal I is defined over the prime field ℚ of ℂ, and the unique field of definition of I is ℚ.

The following lemma captures one important aspect of the proof of the existence and uniqueness of the field of definition.

Lemma 2.4.16. Let K′ ⊆ K be a field extension, let P′ = K′[x_{1}, …, x_{n}], let M′ ⊆ (P′)^{r} be a P′ -submodule of (P′)^{r}, and let M be the P -submodule of P^{r} generated by the elements of M′.

a) A σ -Gröbner basis of M′ is also a σ -Gröbner basis of M. In particular, we have LT_{σ}{M′} = LT_{σ}{M}.

b) The reduced σ -Gröbner basis of M′ is also the reduced σ -Gröbner basis of M.

Proof. Let G = {g_{1}, …, g_{s}} ⊆ (P′)^{r} \ {0} be a σ -Gröbner basis of M′. Since the set G generates the P′ -module M′ and the set M′ generates the P -module M, the set G generates the P -module M.

Let G be the tuple (g_{1}, …, g_{s}). Using Theorem 2.3.7, we see that Syz(LT_{σ}(G)) = ⟨σ_{ij} | 1 ≤ i < j ≤ s, γ_{i} = γ_{j}⟩, where σ_{ij} ∈ (P′)^{s} is given by σ_{ij} = \frac{1}{c_{i}} t_{ij}ε_{i} − \frac{1}{c_{j}} t_{ji}ε_{j}. By Condition D_{1}) of Theorem 2.4.1, the elements σ_{ij} have liftings in (P′)^{s}. These liftings are also liftings in P^{s} of the elements σ_{ij} if we consider those as elements of P^{s}. Using Condition D_{3}) of Theorem 2.4.1, we deduce that G is in fact a σ -Gröbner basis of M. This proves a).

To prove b), we observe that the extra conditions required in Definition 2.4.12 are independent of the base field. □

Theorem 2.4.17. (Existence and Uniqueness of the Field of Definition) Let M be a non-zero P -submodule of P^{r}.

a) There exists a unique field of definition of M.

b) Given any module term ordering σ, let G be the corresponding reduced σ -Gröbner basis of M. Then the field of definition of M is the field generated over the prime field of K by the coefficients of the terms in the support of the vectors in G.

Proof. Let σ be a module term ordering, and let G be the reduced σ - Gröbner basis of M. Moreover, let k be the field generated over the prime field of K by the coefficients of the elements of G. Since the set G generates M, the module M is defined over k.

Suppose now that K′ ⊆ K is a subfield over which M is defined, i.e. suppose there exists a system of generators {m_{1}, …, m_{t}} of the P -module M which is contained in K′[x_{1}, …, x_{n}]^{r} \ {0}. Let G′ = {g′_{1}, …, g′_{s}} ⊆ K′[x_{1}, …, x_{n}]^{r} be the reduced σ -Gröbner basis of the K′[x_{1}, …, x_{n}]-module ⟨m_{1}, …, m_{t}⟩ ⊆ K′[x_{1}, …, x_{n}]^{r}. Since the reduced σ -Gröbner basis of a module is unique, Lemma 2.4.16.b implies G = G′. From this we infer that k ⊆ K′.

The facts that M is defined over k, and that every other field over which M is defined contains k, together imply both claims of the theorem. □

Exercise 1. Let I = (g) with g ∈ P \ {0} be a principal ideal in P . Show that G = {g} is a Gröbner basis of I with respect to every term ordering.

Exercise 2. Let m_{1}, …, m_{s} ∈ P^{r} be terms, and let M = ⟨m_{1}, …, m_{s}⟩. Show that {m_{1}, …, m_{s}} is a Gröbner basis of M with respect to every term ordering.

Exercise 3. Let G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0} be a σ -Gröbner basis of the P -module M = ⟨g_{1}, …, g_{s}⟩, and let m ∈ M. Show that G ∪ {m} is a σ -Gröbner basis of M.

Exercise 4. Let g_{1} = x_{2} − x_{1}^{2} and g_{2} = x_{3} − x_{1}^{3} be polynomials in K[x_{1}, x_{2}, x_{3}]. Find a term ordering σ on 𝕋^{3} such that G = {g_{1}, g_{2}} is a σ -Gröbner basis of the ideal I = (g_{1}, g_{2}), and a term ordering τ such that it is not.

Exercise 5. Let P = K[x_{1}, …, x_{n}], let m ≤ n, let G = {f_{1}, f_{2}, …, f_{m}}, where f_{i} ∈ K[x_{i}] for i = 1, …, m, and let I ⊆ P be the ideal generated by G.

a) Use Condition C_{3}) of Theorem 2.4.1 to show that G is a σ -Gröbner basis of I with respect to every term ordering σ.

b) If, moreover, the polynomials f_{i} are monic, show that G is the reduced σ -Gröbner basis of I with respect to every term ordering σ.

Exercise 6. Let R be a Noetherian integral domain. Show that the following conditions are equivalent.

a) For all a, b ∈ R \ {0}, the ideal (a) ∩ (b) is principal.

b) The ring R is factorial. Hint: Use Exercise 6 in Section 1.2.

Exercise 7. Using Corollary 2.4.11 and CoCoA, find a set of terms whose residue classes form a basis of ℤ/(5)[x, y, z]/(x^{2}−yz, y^{3}+z^{3}, z^{5}−x^{2}y^{2}) as a ℤ/(5)-vector space. (Hint: You may use the CoCoA function GBasis(...).)

Exercise 8. A system of generators G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0} of a P -module M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r} is called a minimal σ -Gröbner basis of M if {LT_{σ}(g_{1}), …, LT_{σ}(g_{s})} is a minimal system of generators of LT_{σ}(M).

a) Prove that any two minimal σ -Gröbner bases of M have the same number of elements.

b) Give an example of a module M which has two different minimal σ -Gröbner bases, all of whose elements g_{i} have leading coefficients LC_{σ}(g_{i}) = 1.

Exercise 9. Let σ be a term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. We set LT_{σ}(0) = ∞. In particular, we are assuming LT_{σ}(g) <_{σ} LT_{σ}(0) for every g ∈ P^{r}. Given a tuple (g_{1}, …, g_{s}) ∈ (P^{r})^{s}, we identify it with the tuple (g_{1}, …, g_{s}, 0) ∈ (P^{r})^{s+1} , hence with (g_{1}, …, g_{s}, 0, 0) ∈ (P^{r})^{s+2} , and so on. For two tuples G = (g_{1}, …, g_{s}) ∈ (P^{r})^{s} and G′ = (g′_{1}, …, g′_{s′}) ∈ (P^{r})^{s′}, we define G ⪯ G′ if and only if LT_{σ}(G) ≤_{Lex} LT_{σ}(G′). This means that either there exists an index i ≥ 1 such that LT_{σ}(g_{i}) <_{σ} LT_{σ}(g′_{i}) and LT_{σ}(g_{j}) = LT_{σ}(g′_{j}) for 1 ≤ j < i, or we have G = G′. A tuple G = (g_{1}, …, g_{s}) of elements in P^{r} is said to be increasingly ordered with respect to σ if LT_{σ}(g_{1}) ≤_{σ} ⋯ ≤_{σ} LT_{σ}(g_{s}). It is said to be interreduced if g_{i} ≠ 0 for i = 1, …, s and LT_{σ}(g_{i}) does not divide any term in Supp(g_{j}) for i, j ∈ {1, …, s} such that i ≠ j. Finally, the tuple G it is called monic if all its components are monic.

a) For g_{1}, …, g_{s}, g_{s+1}, …, g_{t} ∈ P^{r}, show (g_{1}, …, g_{s}, g_{s+1}, …, g_{t}) ⪯ (g_{1}, …, g_{s}). b) Prove that the relation ⪯ is reflexive and transitive, but not a to-

tal ordering on the set of the increasingly ordered tuples of elements of P^{r}.

c) Let M be a non-zero submodule of P^{r}, and let G be an increasingly ordered, interreduced tuple of elements of M. Show that the following conditions are equivalent.

1) With respect to ⪯, the tuple G is minimal among all increasingly ordered, interreduced, monic tuples of elements of M.

2) The tuple G is obtained by increasingly ordering the reduced σ - Gröbner basis of M.

Exercise 10. Let I be an ideal of P = K[x_{1}, …, x_{n}], let σ be a term ordering on 𝕋^{n}, and let Γ be a group of K -algebra automorphisms of P . Show by example that if I is Γ -stable (i.e. if γ(I) ⊆ I for all γ ∈ Γ ), then the reduced σ -Gröbner basis of I need not be Γ -stable.

Tutorial 21: Linear Algebra

The purpose of this tutorial is to show how Gaußian Elimination in Linear Algebra relates to the theory of Gröbner bases. Let K be a field, let m, n > 0, and let A = (a_{ij}) be an m × n-matrix with coefficients in K. We equip the ring P = K[x_{1}, …, x_{n}] with the lexicographic term ordering Lex.

a) Write a CoCoA program RowReduce(…) which uses row operations to bring the matrix A into row echelon form and then returns the matrix B = (b_{ij}) obtained in this way.

b) For i = 1, …, m, let f_{i} = a_{i1}x_{1}+⋯+a_{in}x_{n} and g_{i} = b_{i1}x_{1}+⋯+b_{in}x_{n}. Show that G = {g_{i} | 1 ≤ i ≤ m, g_{i} ≠ 0} is a Lex-Gröbner basis of the ideal I = (f_{1}, …, f_{m}).

c) Find and prove an algorithm which computes the Lex-Gröbner basis of an ideal I of P which is generated by polynomials of degree ≤ 1.

d) Implement your algorithm in a CoCoA function LinearGB(…) which takes a list of polynomials of degree ≤ 1 generating I and returns the Lex-Gröbner basis of I.

e) Use LinearGB(…) to compute the Lex-Gröbner bases of the following ideals.

1) I_{1} = (3x_{1} − 6x_{2} − 2x_{3}, 2x_{1} − 4x_{2} + 4x_{4}, x_{1} − 2x_{2} − x_{3} − x_{4}) ⊆ ℚ[x_{1}, x_{2}, x_{3}, x_{4}]

2) I_{2} = (x_{1} + x_{2} + x_{3}, x_{1} − x_{2}, x_{1} − x_{3}) ⊆ ℚ[x_{1}, x_{2}, x_{3}]

3) I_{3} = (x_{1} + 1, x_{2} + x_{3} + 1, x_{4} + x_{5} + 1, x_{1} + x_{4} − 1) ⊆ ℚ[x_{1}, …, x_{5}] Tutorial 22: Reduced Gröbner Bases

In this tutorial we shall implement an algorithm to find the reduced Gröbner basis from an arbitrary one, and we shall study various particular cases of reduced Gröbner bases. So let K be a field, n ≥ 1, P = K[x_{1}, …, x_{n}], r ≥ 1, σ a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, and G = {g_{1}, …, g_{s}} ⊆ P^{r} \{0} a σ -Gröbner basis of theP -submodule M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}.

a) Implement the method described in the proof of Theorem 2.4.13. Write a CoCoA function ReduceGB(…) which takes any σ -Gröbner basis of M and computes the reduced σ -Gröbner basis from it.

b) Apply your function ReduceGB(…) in the following cases, assuming each time that the given sets are Lex-Gröbner bases of the ideals they generate.

1) G_{1} = {x^{2} + y^{2} + 1, x^{2}y + 2xy + x, −2xy − x + y^{3} + y, −y^{5} − 2y^{4} + y^{2} + y − 2} ⊆ ℤ/(5)[x, y].

2) G_{2} = {xz^{3} −x−3y^{6} −18y^{4} −12y^{3} −18y^{2} −12y −3, 15x−y^{6} −12y^{5} − 79y^{3}−24y^{2}−67y+z^{3}−26, y^{6}+6y^{4}+4y^{3}+6y^{2}+4y−z^{3}+2, z^{3}−1} ⊆ ℚ[x, y, z].

3) G_{3} = {x^{2} + y − 1, xy − 2y^{2} + 2y, 4y^{3} − 7y^{2} + 3y, 1/2x^{2} + 1/2xy −

y^{2} + 3/2y − 1/2} ⊆ ℚ[x, y].

c) Now we equip the polynomial ring P with its standard grading (see Example 1.7.2). Prove that an ideal I ⊆ P is homogeneous if and only if its reduced σ -Gröbner basis consists of homogeneous polynomials. Hint: First show that any homogeneous ideal has a σ -Gröbner basis consisting of homogeneous polynomials.

d) Let m ≥ 1, let A = (a_{ij}) be an m × n-matrix with coefficients in K, and let f_{i} = a_{i1}x_{1} + ⋯ + a_{in}x_{n} for i = 1, …, m. Using row operations only, we bring A to reduced row echelon form B = (b_{ij}), i.e. in the row echelon form we clear out everything starting from the bottom. For the non-zero rows numbered i = 1, …, t of B, we form the linear polynomials g_{i} = b_{i1}x_{1} + ⋯ + b_{in}x_{n}. Prove that {g_{1}/ LC_{Lex}(g_{1}), …, g_{t}/ LC_{Lex}(g_{t})} is the reduced Lex-Gröbner basis of the ideal I = (f_{1}, …, f_{m}) of P.

e) Write a CoCoA program LinRedGB(…) which computes the reduced Lex-Gröbner basis of an ideal I = (f_{1}, …, f_{m}) as in d) using the method described there.

f) Apply your function LinRedGB(…) to the ideals I_{1} and I_{2} of Tutorial 21.e. Check your results by comparing them to the results of

LinearGB(. . .) and ReduceGB(. . .).

g) Suppose that {m_{1}, …, m_{t}} ⊆ P^{r} \ {0} is any system of generators of the P -module M, and that G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0} is the reduced σ -Gröbner basis of M. Then there are matrices A = (a_{ij}) and B = (b_{ij}) with coefficients in P such that m_{i} = a_{i1}g_{1} + ⋯ + a_{is}g_{s} for i = 1, …, t and g_{j} = b_{j1}m_{1} + ⋯ + b_{jt}m_{t} for j = 1, …, s. Give an example in which AB is not the identity matrix.

2.5 Buchberger’s Algorithm

Knowing + and × is good enough, understanding their interaction is ideal.

(Bruno Buchberger)

In the last section we saw some theoretical applications of Gröbner bases, especially of reduced Gröbner bases. But Gröbner bases would be hardly more than a small side subject in commutative algebra if we did not have the possibility of computing them. The key to almost all applications of Gröbner bases in Computational Commutative Algebra, and therefore to the remainder of these volumes, is the algorithm developed by Bruno Buchberger in his doctoral thesis [Bu65].

As we mentioned in the introduction of Section 2.3, the algorithmic way to replace a given set of generators of a module with a Gröbner basis is based on the characterization of Gröbner bases via lifting of syzygies. The idea is that we need to check whether the set of generators satisfies Condition D_{3}). If a syzygy of the leading terms is found which does not lift to a syzygy of the generators, we can find an element of the module which has a new leading term. By adding it to the set of generators, we can achieve the desired lifting. Then the termination of the algorithm is guaranteed by Dickson’s Lemma (more precisely, by Corollary 1.3.10), and its correctness follows from the fact that lifting of syzygies characterizes Gröbner bases (see Theorem 2.4.1).

Since Buchberger’s Algorithm is the basic tool underlying most calculations in Computational Commutative Algebra, it is very important to study possibilities for optimizing it. First indications on how to avoid some unnecessary steps in the execution of the algorithm are given in Remark 2.5.6 and Proposition 2.5.8. Some additional possibilities are contained in Tutorial 25. For the case of systems of generators consisting of homogeneous polynomials or vectors of polynomials, an efficient version of Buchberger’s Algorithm will be explained in Volume 2.

At the end of this section we discuss the Extended Buchberger Algorithm. Besides a Gröbner basis, it also yields the change of basis matrix from the given system of generators to the Gröbner basis (see Proposition 2.5.11).

As usual, let K be a field, let n ≥ 1, let P = K[x_{1}, …, x_{n}] be a polynomial ring, let r ≥ 1, and let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. Our goal is to compute a σ -Gröbner basis of a P -submodule M ⊆ P^{r} which is explicitly given by a system of generators G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0}. Let G be the tuple (g_{1}, …, g_{s}). We start by writing LM_{σ}(g_{i}) = c_{i}t_{i}e_{γ_{i}} with c_{i} ∈ K \ {0}, t_{i} ∈ 𝕋^{n}, and γ_{i} ∈ {1, …, r} for i = 1, …, s, and by recalling the fundamental diagram

0 ⟶  Syz(G)  ⟶ P^{s} ⟶^{λ} P^{r} ⟶ P^{r}/M ⟶ 0
↓^{LF}  ↓^{LM}
0 ⟶ Syz(LM_{σ}(G)) ⟶ P^{s} ⟶^{Λ} P^{r} ⟶ P^{r}/N ⟶ 0

studied in Section 2.3. Then we introduce or recall the following abbreviations.

Definition 2.5.1. Let 𝔹 be the set 𝔹 = {(i, j) | 1 ≤ i < j ≤ s, γ_{i} = γ_{j}}. Moreover, let t_{ij} = \frac{lcm(t_{i},t_{j})}{t_{i}} = \frac{t_{j}}{gcd(t_{i},t_{j})} ∈ 𝕋^{n} and σ_{ij} = \frac{1}{c_{i}} t_{ij}ε_{i}− \frac{1}{c_{j}} t_{ji}ε_{j} ∈ P^{s} for all i, j ∈ {1, …, s}. For every pair (i, j) ∈ 𝔹, we call

S_{ij} = λ(σ_{ij}) = \frac{1}{c_{i}} t_{ij} g_{i} − \frac{1}{c_{j}} t_{ji} g_{j} ∈ M

the S-vector of g_{i} and g_{j}. If r = 1, we call S_{ij} ∈ P also the S-polynomial of g_{i} and g_{j}.

We can rephrase Theorem 2.3.7 by saying that if (i, j) ∈ 𝔹, then σ_{ij} is a homogeneous element of P^{s} with deg_{σ,G}(σ_{ij}) = lcm(t_{i}, t_{j})e_{γ_{i}} and that the set Σ = {σ_{ij} | (i, j) ∈ 𝔹} is a homogeneous system of generators of the P -module Syz(LM_{σ}(G)). Furthermore, we know by Theorem 2.4.1 that G is a σ -Gröbner basis of M if and only if all those elements σ_{ij} have liftings in Syz(G). For some of them, this is always the case.

Proposition 2.5.2. Let (i, j) ∈ 𝔹 be such that S_{ij} ⟶^{G} 0. Then σ_{ij} has a lifting in Syz(G).

Proof. If S_{ij} = 0, there is nothing to show, since σ_{ij} is a lifting of itself. Thus we may assume S_{ij} ≠ 0. In view of Lemma 2.2.6, we can use S_{ij} ⟶^{G} 0 to obtain a representation S_{ij} = ∑_{k=1}^{s} f_{k}g_{k} with f_{1}, …, f_{s} ∈ P such that LT_{σ}(S_{ij}) = max_{σ}{LT_{σ}(f_{k}g_{k}) | 1 ≤ k ≤ s, f_{k}g_{k} ≠ 0}. Since σ_{ij} is homogeneous, we have Λ(LF(σ_{ij})) = Λ(σ_{ij}) = 0, and Proposition 2.3.6.b yields deg_{σ,G}(σ_{ij}) >_{σ} LT_{σ}(S_{ij}). Now we consider the element τ_{ij} = σ_{ij} − ∑_{k=1}^{s} f_{k}ε_{k} ∈ P^{s}. From deg_{σ,G}(∑_{k=1}^{s} f_{k}ε_{k}) = LT_{σ}(S_{ij}) <_{σ} deg_{σ,G}(σ_{ij}) we deduce that LF_{σ,G}(τ_{ij}) = σ_{ij}. From λ(τ_{ij}) = λ(σ_{ij})−S_{ij} = 0 and LF(τ_{ij}) = σ_{ij} we conclude that τ_{ij} is a lifting of σ_{ij} in Syz(G). □

Corollary 2.5.3. (Buchberger’s Criterion) Let M ⊆ P^{r} be a P -submodule generated by G = {g_{1}, …, g_{s}} ⊆ P^{r} \ {0}, and let G = (g_{1}, …, g_{s}). Then the following conditions are equivalent.

a) The set G is a σ -Gröbner basis of M.

b) For all pairs (i, j) ∈ 𝔹, we have NR_{σ,G}(S_{ij}) = 0.

Proof. If G is a σ -Gröbner basis of M, then S_{ij} ∈ M yields NR_{σ,G}(S_{ij}) = 0 by Corollary 2.4.9.a and Proposition 2.4.10.a. Conversely, if condition b) holds, then S_{ij} ⟶^{G} 0. Using Proposition 2.5.2 we see that, for every pair (i, j) ∈ 𝔹, the element σ_{ij} has a lifting in Syz(G). Thus Condition D_{3}) of Theorem 2.4.1 holds. □

Let us see how this criterion applies in practice. The following example also shows that the leading term ideal of the square of an ideal is, in general, not the square of the leading term ideal.

Example 2.5.4. Let P = ℚ[x, y, z], let σ = DegRevLex, and let I be the ideal of P generated by g_{1} = x^{2} − y^{2} , g_{2} = xy^{2} − z^{3} , and g_{3} = y^{4} − xz^{3} = −y^{2}g_{1} + xg_{2} . Successively, we compute

S_{12} = −y^{2}g_{1} + xg_{2} = y^{4} − xz^{3} ⟶^{g_{3}} 0
S_{13} = y^{4}g_{1} − x^{2}g_{3} = −y^{6} + x^{3}z^{3} ⟶^{g_{3}} x^{3}z^{3} − xy^{2}z^{3} ⟶^{g_{2}} 0
S_{23} = y^{2}g_{2} − xg_{3} = −y^{2}z^{3} + x^{2}z^{3} ⟶^{g_{1}} 0

Thus Buchberger’s Criterion applies and says that {g_{1}, g_{2}, g_{3}} is a σ -Gröbner basis of I. In particular, the leading term ideal of I is LT_{σ}(I) = (x^{2}, xy^{2}, y^{4}).

By the way, in this example the obvious inclusion LT_{σ}(I)^{2} ⊆ LT_{σ}(I^{2}) is a strict one, disproving a claim in [CLS92], p. 443. More precisely, the element f = g_{2}^{2} −g_{1}g_{3} = y^{6} +x^{3}z^{3} −3xy^{2}z^{3} +z^{6} ∈ I^{2} has a leading term LT_{σ}(f) = y^{6} which is not in LT_{σ}(I)^{2} .

The idea of Buchberger’s Algorithm is to enlarge G in such a way that eventually all elements σ_{ij} with (i, j) ∈ 𝔹 have a lifting in Syz(G). By Theorem 2.4.1, this ensures that the enlarged set is a σ -Gröbner basis of M.

Theorem 2.5.5. (Buchberger’s Algorithm) Let G = (g_{1}, …, g_{s}) ∈ (P^{r})^{s} be a tuple of non-zero elements which generate a submodule M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}. For i = 1, …, s, let LM_{σ}(g_{i}) = c_{i}t_{i}e_{γ_{i}} with c_{i} ∈ K \ {0}, t_{i} ∈ 𝕋^{n}, and γ_{i} ∈ {1, …, r}. Consider the following sequence of instructions.

1) Let s′ = s and B = 𝔹 = {(i, j) | 1 ≤ i < j ≤ s′, γ_{i} = γ_{j}}.

2) If B = ∅, return the result G. Otherwise, choose a pair (i, j) ∈ B and delete it from B.

3) Compute S_{ij} = \frac{t_{j}}{c_{i} gcd(t_{i},t_{j})} g_{i}− \frac{t_{i}}{c_{j} gcd(t_{i},t_{j})} g_{j} and NR_{σ,G}(S_{ij}). If the result is NR_{σ,G}(S_{ij}) = 0, continue with step 2).

4) Increase s′ by one. Append g_{s′} = NR_{σ,G}(S_{ij}) to G and the set of pairs {(i, s′) | 1 ≤ i < s′, γ_{i} = γ_{s′}} to B. Then continue with step 2).

This is an algorithm, i.e. it stops after finitely many steps. It returns a tuple G of vectors which form a σ -Gröbner basis of M.

Proof. Every time step 2) is executed, one pair is cancelled from B. The set B is enlarged only in step 4). When this happens, an element is appended to G which has a leading term with respect to σ which is not in the monomodule generated by the leading terms of the previous elements of G. Corollary 1.3.10 shows that P^{r} cannot contain an infinite chain

⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{s})⟩ ⊂ ⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{s+1})⟩ ⊂ ⋯

Therefore step 4) can be executed only a finite number of times, i.e. the procedure stops after finitely many steps.

It remains to show that when the algorithm stops, the vectors in the resulting tuple G form a σ -Gröbner basis of M. During the execution of the procedure all pairs (i, j) ∈ 𝔹 are considered, since whenever s′ is increased in step 4), all necessary new pairs (i, s′) are added to B. By Corollary 2.5.3, it suffices to show that, for every (i, j) ∈ 𝔹, we have NR_{σ,G}(S_{ij}) = 0. If at a certain step S_{ij} = 0 or NR_{σ,G}(S_{ij}) = 0, there is nothing to prove. If at a certain step NR_{σ,G}(S_{ij}) ≠ 0, then NR_{σ,G}(S_{ij}) is added to the tuple G. Hence NR_{σ,G}(S_{ij}) reduces to 0 via the rewrite rule defined by the vectors in the new tuple. □

A closer look at this proof shows that a number of variants and optimizations of Buchberger’s Algorithm are possible. Some of the most effective ones will be discussed in Tutorial 25 and in Volume 2. Here we limit ourselves to pointing out some obvious opportunities for improvement.

Remark 2.5.6. (First Optimizations of Buchberger’s Algorithm)

a) In Buchberger’s Algorithm, one can substitute the computation of the normal remainder NR_{σ,G}(S_{ij}) by any procedure producing an element m ∈ P^{r} which satisfies S_{ij} ⟶^{G} m, and LT_{σ}(m) ∉ ⟨LT_{σ}(g_{1}), …, LT_{σ}(g_{s′})⟩ if m ≠ 0.

b) If 𝔹′ ⊆ 𝔹 is a subset with the property that also the set {σ_{ij} | (i, j) ∈ 𝔹′} generates Syz(LM_{σ}(G)), it suffices to start with B = 𝔹′ in step 1) of Buchberger’s Algorithm. This follows from Proposition 2.3.11.

c) In step 2) of the theorem we did not specify which pair (i, j) ∈ B we should choose. One possibility is to take the pair (i, j) for which lcm(t_{i}, t_{j}) is minimal with respect to σ. This is called the normal selection strategy. It works well in practice if the term ordering σ is degree-compatible. Another possibility which avoids sorting the terms lcm(t_{i}, t_{j}) with respect to σ is to take any pair (i, j) for which the degree of lcm(t_{i}, t_{j}) is minimal.

To help the reader understand Theorem 2.5.5 better, we now apply Buchberger’s Algorithm in a concrete case.

Example 2.5.7. Let n = 2, let r = 1, let M ⊆ P = K[x, y] be the ideal generated by g_{1} = x^{2} and g_{2} = xy + y^{2} , and let G = (g_{1}, g_{2}). We want to compute a Gröbner basis of M with respect to σ = Lex and follow the steps of Buchberger’s Algorithm.

1) Let s′ = 2 and B = {(1, 2)}.

2) Choose (1, 2) ∈ B and set B = ∅.

3) We compute S_{12} = yg_{1} − xg_{2} = −xy^{2} ⟶^{g_{2}} y^{3} = NR_{σ,G}(S_{12}) ≠ 0.

4) Let s′ = 3, let G = (g_{1}, g_{2}, g_{3}) with g_{3} = y^{3} , and let B = {(1, 3), (2, 3)}. Then return to step 2).

2) Choose (1, 3) ∈ B and set B = {(2, 3)}.

3) We compute S_{13} = y^{3}g_{1} − x^{2}g_{3} = 0 and return to step 2).

2) Choose (2, 3) ∈ B and set B = ∅.

3) We compute S_{23} = y^{2}g_{2} − xg_{3} = y^{4} . Then we calculate S_{23} ⟶^{g_{3}} 0 = NR_{σ,G}(S_{23}) and return to step 2).

2) Since B = ∅, we return the result G = (g_{1}, g_{2}, g_{3}).

If r = 1, i.e. if M is an ideal in P, there is another optimization of Buchberger’s Algorithm which turns out to be useful in practise.

Proposition 2.5.8. Let G = (g_{1}, …, g_{s}) be a tuple of non-zero polynomials, let I = (g_{1}, …, g_{s}) ⊆ P, and let t_{i} = LT_{σ}(g_{i}) for i = 1, …, s. Suppose that gcd(t_{i}, t_{j}) = 1 for some pair (i, j) ∈ 𝔹. Then σ_{ij} has a lifting in Syz(G).

Proof. This follows from the observations that σ_{ij} = \frac{1}{c_{i}} t_{j}ε_{i} − \frac{1}{c_{j}} t_{i}ε_{j} and that τ_{ij} = \frac{1}{c_{i}c_{j}} g_{j}ε_{i} − \frac{1}{c_{i}c_{j}} g_{i}ε_{j} is a lifting of σ_{ij} in Syz(G). □

Remark 2.5.9. For f, g ∈ P, the pair (−g, f) is called the trivial syzygy of (f, g). Therefore Proposition 2.5.8 can be rephrased by saying that if gcd(t_{i}, t_{j}) = 1, then the trivial syzygy of (LM_{σ}(g_{i}), LM_{σ}(g_{j})) can be lifted to the trivial syzygy of (g_{i}, g_{j}).

The above result can be used to detect some special Gröbner bases.

Corollary 2.5.10. Let G = {g_{1}, …, g_{s}} ⊆ P \{0}, and let I = (g_{1}, …, g_{s}). Assume that the leading terms of the elements g_{1}, …, g_{s} are pairwise coprime. Then G is a σ -Gröbner basis of I.

Proof. Let G = (g_{1}, …, g_{s}). By Proposition 2.5.8, every element σ_{ij} has a lifting in Syz(G). Thus G satisfies Condition D_{3}) of Theorem 2.4.1. □

Finally, we can extend Buchberger’s Algorithm in such a way that it not only computes a Gröbner basis of a submodule M ⊆ P^{r}, but also a matrix of polynomials which describes how the Gröbner basis can be expressed in terms of the original system of generators of M.

Proposition 2.5.11. (The Extended Buchberger Algorithm) Let G = (g_{1}, …, g_{s}) ∈ (P^{r})^{s} be a tuple of non-zero vectors in P^{r} which generate a submodule M = ⟨g_{1}, …, g_{s}⟩ ⊆ P^{r}. We write LM_{σ}(g_{i}) = c_{i}t_{i}e_{γ_{i}} with c_{i} ∈ K \ {0}, t_{i} ∈ 𝕋^{n}, and γ_{i} ∈ {1, …, r} for i = 1, …, s. Consider the following sequence of instructions.

1) Let s′ = s, let A be the s × s identity matrix, and let B = 𝔹.

2) If B = ∅, return the result (G, A). Otherwise, choose a pair (i, j) ∈ B and delete it from B.

3) Use the Division Algorithm 1.6.4 to compute a representation S_{ij} = q_{1}g_{1} + ⋯ + q_{s′}g_{s′} + p, where q_{1}, …, q_{s′} ∈ P and p ∈ P^{r}, such that the conditions of Theorem 1.6.4 hold. If p = 0, continue with step 2).

4) If p ≠ 0 in step 3), then increase s′ by one, append g_{s′} = p to G, add {(i, s′) | 1 ≤ i < s′, γ_{i} = γ_{s′}} to B, and append the column vector \frac{t_{j}}{c_{i} gcd(t_{i},t_{j})}a_{i} − \frac{t_{i}}{c_{j} gcd(t_{i},t_{j})}a_{j} − q_{1}a_{1} − ⋯ − q_{s′−1}a_{s′−1} to A, where a_{1}, …, a_{s′−1} denote the previous columns of A. Then continue with step 2).

This is an algorithm, i.e. it stops after finitely many steps. It returns a tuple G = (g_{1}, …, g_{s′}) of vectors which form a σ -Gröbner basis of M, where s′ ≥ s, together with an s × s′ -matrix A = (a_{ij}) of polynomials such that g_{j} = a_{1j}g_{1} + ⋯ + a_{sj}g_{s} for j = 1, …, s′.

Proof. In view of Theorem 2.5.5, it suffices to prove the last claim. Each time a new column is appended to A in step 4), we have g_{j} = a_{1j}g_{1}+⋯+a_{sj}g_{s} for j < s′, where s′ is the current number of columns of A. Now the calculation

g_{s′} = p = S_{ij} − q_{1}g_{1} − ⋯ − q_{s′−1}g_{s′−1}
= \frac{t_{ij}}{c_{i}} (a_{1i}g_{1} + ⋯ + a_{si}g_{s}) − \frac{t_{ji}}{c_{j}} (a_{1j}g_{1} + ⋯ + a_{sj}g_{s})
− ∑_{k=1}^{s′−1}q_{k}(a_{1k}g_{1} + ⋯ + a_{sk}g_{s})
= (g_{1}, …, g_{s}) · (\frac{t_{j}}{c_{i} gcd(t_{i},t_{j})}a_{i} − \frac{t_{i}}{c_{j} gcd(t_{i},t_{j})}a_{j} − q_{1}a_{1} − ⋯ − q_{s′−1}a_{s′−1})
= (g_{1}, …, g_{s}) · (a_{1s′}, …, a_{ss′})^{tr} = a_{1s′}g_{1} + ⋯ + a_{ss′}g_{s}

finishes the proof. □

To show how this extended algorithm works in practice, let us apply it in the situation of Example 2.5.7.

Example 2.5.12. Let n = 2, let r = 1, let M ⊆ P = K[x, y] be the ideal generated by g_{1} = x^{2} and g_{2} = xy + y^{2} , and let G = (g_{1}, g_{2}). As in Example 2.5.7, we follow the steps of the Buchberger Algorithm, except that we now use the extended version above.

1) Let s′ = 2, let A = \binom{1 0}{0 1}, and let B = \{(1, 2)\}.

2) Choose (1, 2) ∈ B and set B = ∅.

3) We compute S_{12} = −xy^{2} = 0·g_{1} +(−y)·g_{2} +y^{3} and let q_{1} = 0, q_{2} = −y, and p = y^{3} .

4) Let s′ = 3, let G = (g_{1}, g_{2}, g_{3}) with g_{3} = y^{3} , and let B = {(1, 3), (2, 3)}. We append the column vector ya_{1} − xa_{2} − 0 · a_{1} + ya_{2} to the matrix A and get A = \binom{1 0 y}{0 1 −x+y}. Then we return to step 2).

2) Choose (1, 3) ∈ B and set B = {(2, 3)}.

3) We compute S_{13} = y^{3}g_{1} − x^{2}g_{3} = 0 and return to step 2).

2) Choose (2, 3) ∈ B and set B = ∅.

3) We compute S_{23} = y^{4} = 0 · g_{1} + 0 · g_{2} + yg_{3} . Then we return to step 2).

2) Since B = ∅, we return the result (G, A), where G = (g_{1}, g_{2}, g_{3}) and A = \binom{1 0 y}{0 1 −x+y}.

Exercise 1. Let P = K[x, y, z], let G = (x^{2} − y, xy − z) ∈ P^{2} , and let σ = DegRevLex. Perform all steps of Buchberger’s Algorithm applied to G. Then find a term ordering σ such that G is a σ -Gröbner basis of the ideal (x^{2} − y, xy − z).

Exercise 2. Apply Buchberger’s Algorithm as in Example 2.5.7 to compute a DegLexPos-Gröbner basis of the submodule M = ⟨g_{1}, g_{2}, g_{3}, g_{4}⟩ of ℚ[x, y]^{3} in the following cases.

a) g_{1} = (x^{2}, xy, y^{2}), g_{2} = (y, 0, x), g_{3} = (0, x, y), g_{4} = (y, 1, 0)

b) g_{1} = (y − x, y, y), g_{2} = (xy, x, x), g_{3} = (x, y, y), g_{4} = (x, y, 0)

c) g_{1} = (0, y, x), g_{2} = (0, x, xy − x), g_{3} = (y, x, 0), g_{4} = (y^{2}, y, 0)

Exercise 3. In the cases of Exercise 2, determine representatives for a K -basis of ℚ[x, y]^{3}/M.

Exercise 4. Find out which module M ⊆ ℚ[x, y]^{3} in Exercise 2 contains the vector

m = (x^{2}y − y^{2} + xy^{2}, xy^{2} − y^{2} + x^{2} + 2xy − x − y, x^{2}y + xy^{2} − 3xy + x)

Exercise 5. A polynomial f ∈ P = K[x_{1}, …, x_{n}] is called a binomial if it is of the form f = at + a′t′ with a, a′ ∈ K \ {0} and t, t′ ∈ 𝕋^{n}. Let σ be a term ordering on 𝕋^{n} and I a binomial ideal, i.e. an ideal generated by binomials.

a) Prove that the reduced σ -Gröbner basis of I consists of binomials.

b) Given a term t ∈ 𝕋^{n}, show that NF_{σ,I}(t) is a scalar multiple of a term.

Exercise 6. Consider the polynomial ring P = ℚ[x, y], the P -sub-module M = ⟨g_{1}, g_{2}, g_{3}, g_{4}⟩ ⊆ P^{3} such that g_{1} = (xy, x, y), g_{2} = (y^{2} + y, x + y^{2}, x), g_{3} = (−x, y, x), g_{4} = (y^{2}, y, x), and the module term ordering

σ = LexPos.

a) Using the algorithm given in Proposition 2.5.11, compute a σ -Gröbner basis {g_{1}, …, g_{s′}} of M, where s′ ≥ 4, and a matrix A such that (g_{1}, …, g_{s′}) = (g_{1}, …, g_{4}) · A.

b) Now use the method described in the proof of Proposition 2.4.13 to compute the reduced σ -Gröbner basis {g′_{1}, …, g′_{6}} of M. Then find a matrix A′ such that (g′_{1}, …, g′_{6}) = (g_{1}, …, g_{4}) · A′.

c) For the following elements of P^{3} , check whether they lie in M, and if they do, find their representations in terms of both {g′_{1}, …, g′_{6}} and {g_{1}, …, g_{4}}.

1) m_{1} = (−2y, y − 1, xy + y)

2) m_{2} = (xy^{5} − xy + y, xy^{4} + x + 2y^{2} − y, y^{5} + xy)

d) For the following pairs of elements of P^{r}, check whether m_{1} + M agrees with m_{2} + M in the residue class module P^{r}/M.

1) m_{1} = (2y, x^{2}y + x^{2} + xy + 2x − 3y, −x + y), m_{2} = (−x^{2} + y − x,

x^{3} + 2x^{2}, x^{2} − y)

2) m_{1} = (x^{3} +x^{2} +y−x, x^{2} +x, x+y), m_{2} = (y, x^{3} +2x^{2} −xy−y, 0)

Tutorial 23: Buchberger’s Criterion

In this tutorial we shall implement Buchberger’s Criterion 2.5.3 and use it to decide whether certain sets of polynomials are Gröbner bases of the ideals they generate. As in the whole section, we let K be a field, we let P = K[x_{1}, …, x_{n}] be a polynomial ring over K, we let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, where r ≥ 1, we let G = (g_{1}, …, g_{s}) be a tuple of non-zero vectors, and we let M ⊆ P^{r} be the P -submodule generated by the vectors in G.

a) Write a CoCoA function CheckGB(…) which takes G and uses Buchberger’s Criterion 2.5.3 to check whether it forms a σ -Gröbner basis of M. (Hint: You may want to use the function NormalRemainder(…) from Tutorial 15 or the built-in CoCoA function NR(…).)

b) Let G = {x_{2}−x_{1}^{2}, x_{3}−x_{1}^{3}} ⊆ ℚ[x_{1}, x_{2}, x_{3}}. Use the function CheckGB(…) to check whether G is a σ -Gröbner basis of the ideal it generates, where σ is one of the following term orderings: Lex, DegLex, Ord(V) where

V = ( 0 0 1 0 1 0 1 0 0 ) or V = ( 0 0 1 1 0 0 0 1 0 ).

c) Use the function CheckGB(…) to determine which of the following systems of generators are Gröbner bases with respect to the stated term orderings of the ideals and modules they generate. In the first three cases, try to find a term ordering and a system of generators containing G such that Corollary 2.5.10 can be applied.

1) G = {x_{1}x_{2}^{2} − x_{1}x_{3} + x_{2}, x_{1}x_{2} − x_{3}^{2}, x_{1} − x_{2}x_{3}^{4}} ⊆ ℚ[x_{1}, x_{2}, x_{3}] with respect to Lex

2) G = {x_{1}^{4}x_{2}^{2} − x_{3}^{5}, x_{1}^{3}x_{2}^{3} − 1, x_{1}^{2}x_{2}^{4} − 2x_{3}} ⊆ ℚ[x_{1}, x_{2}, x_{3}] with respect

   to DegLex

3) G = {x_{1}x_{3} − x_{2}^{2}, x_{1}x_{4} − x_{2}x_{3}, x_{2}x_{4} − x_{3}^{2}} ⊆ ℚ[x_{1}, x_{2}, x_{3}, x_{4}] with

   respect to DegRevLex

4) G = {(x_{1}^{2} − x_{2}x_{3})(e_{1} + e_{2}), (x_{1}x_{3} − x_{2}x_{4})(e_{1} − e_{2}), (x_{3}^{2} − x_{1}x_{4})e_{1}, (x_{3}^{2} − x_{1}x_{4})e_{2}} ⊆ ℚ[x_{1}, x_{2}, x_{3}, x_{4}]^{2} with respect to PosDegRevLex

   and DegRevLexPos

5) G = {(x_{1} − x_{2}^{2})e_{1}, (x_{1} − x_{3}^{3})e_{1}, (x_{2} − x_{1}^{2})e_{2}, (x_{2} − x_{3}^{3})e_{2}, (x_{3} − x_{1}^{2})e_{3}, (x_{3} − x_{2}^{3})e_{3}} ⊆ ℚ[x_{1}, x_{2}, x_{3}]^{3} with respect to PosDegRevLex and

   DegRevLexPos

d) Let n > 1, and let σ be the lexicographic term ordering on K[x_{1}, …, x_{n}, y_{1}, …, y_{n}] such that x_{1} >_{σ} ⋯ >_{σ} x_{n} >_{σ} y_{1} >_{σ} ⋯ >_{σ} y_{n}. Moreover, for i = 1, …, n, let s_{i} = ∑_{1≤j_{1}<···<j_{i}≤n} x_{j_{1}} ⋯ x_{j_{i}} be the i^{th} elementary symmetric polynomial in x_{1}, …, x_{n} (see also Tutorial 12), and let h_{i,j} = ∑_{α_{j}+···+α_{n}=i} x_{j}^{α_{j}} ⋯ x_{n}^{α_{n}} for i, j = 1, …, n. Use Buchberger’s Criterion to prove that the polynomials

g_{i} = (−1)^{i}(y_{i} − s_{i}) + ∑_{j=1}^{i−1}(−1)^{j}h_{i−j,i} (y_{j} − s_{j})

such that i = 1, …, n form a σ -Gröbner basis of the polynomial ideal I = (y_{1} − s_{1}, …, y_{n} − s_{n}).

e) Verify the result of d) for n = 1, …, 5 by applying your function CheckGB(…). Can you compute this for larger n? How far can you go?

Tutorial 24: Computing Some Gröbner Bases

The purpose of this tutorial is to implement a first version of Buchberger’s Algorithm in the case of polynomial ideals, and to use it to study some particular examples. For instance, we will see that the elements of the reduced Gröbner basis of an ideal can have very high degree, even if the generators of the ideals have low degrees.

Then, for the specific ideal I = (yz − z^{2}, xz − z^{2}, xy − z^{2}), you will be guided to find all possible reduced Gröbner bases of I, and to give a meaning to the picture on the cover of this book. As usual, we let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K.

a) Write a CoCoA function SPoly(…) which takes a tuple of non-zero polynomials (g_{1}, …, g_{s}) and indices i, j ∈ {1, …, s} with i ≠ j as arguments and returns the S-polynomial S_{ij} of g_{i} and g_{j} with respect to the current term ordering.

b) Implement Buchberger’s Algorithm 2.5.5 in the case of polynomial ideals. To this end, write a CoCoA program FirstGB(…) which takes a tuple of non-zero polynomials generating the ideal and computes a Gröbner basis with respect to the current term ordering. (Hint: For step 3), use the built-in function NR(…) or NormalRemainder(…) of Tutorial 15.)

c) Using FirstGB(…), calculate the Gröbner bases of the following ideals with respect to the stated term orderings.

1) I = (x_{2}^{2}, x_{1}x_{2}x_{3} + x_{3}^{3}) ⊆ ℚ[x_{1}, x_{2}, x_{3}] with respect to DegRevLex 2) I = (x_{1}^{2}x_{2} − 1, x_{1}x_{2}^{2} − x_{1}) ⊆ ℚ[x_{1}, x_{2}] with respect to Lex and

   DegLex

3) I = (x_{1} − x_{3}^{4}, x_{2} − x_{3}^{5}) ⊆ ℚ[x_{1}, x_{2}, x_{3}] with respect to Lex and

   DegRevLex

d) Prove that for every number m ≥ 1, the reduced Gröbner basis of

I_{m} = (x_{1}^{m+1}−x_{2}x_{3}^{m−1}x_{4}, x_{1}x_{2}^{m−1}−x_{3}^{m}, x_{1}^{m}x_{3}−x_{2}^{m}x_{4}) ⊆ K[x_{1}, x_{2}, x_{3}, x_{4}]

with respect to DegRevLex contains f_{m} = x_{3}^{m^{2}+1} −x_{2}^{m^{2}}x_{4} . Note that the degree m^{2} + 1 of this polynomial is much higher than the degrees of the generators of I_{m}. Can you write down the whole reduced Gröbner basis of I_{m} with respect to DegRevLex? (Guess it or prove it!)

e) If you couldn’t do the second part of d), calculate the reduced Gröbner basis of the ideal I_{m} with respect to DegRevLex using FirstGB(…) for m = 1, …, 100 and determine its length. f) Prove that the ideal I_{3} of part d) has the same reduced Gröbner bases

with respect to Lex and DegRevLex. Does this hold for all m ≥ 1? In the remainder of this tutorial, we want to study the polynomial ideal

I = (xy − z^{2}, xz − z^{2}, yz − z^{2}) in P = K[x, y, z]. Although we are not going to use it, we mention that I is the ideal of all polynomials which vanish at three lines in 𝔸_{K}^{3} passing through the origin, or, equivalently, at three points in ℙ_{K}^{2} (see Tutorials 27 and 35).

g) Let σ be any term ordering such that x >_{σ} z and y >_{σ} z. Show that the reduced σ -Gröbner basis of I is {xz − z^{2}, yz − z^{2}, xy − z^{2}}.

h) Let σ be any term ordering such that x >_{σ} z and z >_{σ} y. Show that the reduced σ -Gröbner basis of I is {xy − yz, xz − yz, z^{2} − yz}.

i) Let σ be any term ordering such that y >_{σ} z and z >_{σ} x. Show that the reduced σ -Gröbner basis of I is {z^{2} − xz, yz − xz, xy − xz}.

j) Consider the situation where σ is a term ordering such that z >_{σ} x and z >_{σ} y. Show that there are only two possible reduced Gröbner bases of I, according as x >_{σ} y or y >_{σ} x. Observe that in both cases the number of elements in the reduced Gröbner basis is four.

k) Prove there are exactly five reduced Gröbner bases of I.

l) Group the term orderings in five classes, depending on the inequalities considered before. Then find five term orderings which give rise to the five reduced Gröbner bases you found above.

m) Prove that for each of the five reduced Gröbner bases, there is an infinite set of term orderings σ such that it is the reduced σ -Gröbner basis of I.

n) Consider the description of term orderings by matrices explained in Section 1.4. Try to use it to interpret the following picture.

._{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.} _{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}  ............. ...................................................................... ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ..................................................................................................................................................................................................................................................................................................... ...................................................................................................................................................................................................................... x  y z_{(1, 0, 0)}  _{(0, 1, 0)}^{(0, 0, 1)}

Tutorial 25: Some Optimizations of Buchberger’s Algorithm

The purpose of this tutorial is to find and to implement optimized versions of Buchberger’s Algorithm in the case of polynomial ideals. The amount of time consumed by a certain Gröbner basis computation depends largely on the number of pairs which have to be dealt with, and on the number of reduction steps which have to be performed in order to treat each pair. Therefore we will ask you to implement counters in your programs which measure these quantities, and we will judge our progress towards our goal of optimizing Buchberger’s Algorithm by looking at the numbers returned by those counters.

Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let I ⊆ P be an ideal, and let G = (g_{1}, …, g_{s}) be a tuple of non-zero polynomials which generate I. Furthermore, let σ be a term ordering, and let the elements t_{i}, t_{ij} ∈ 𝕋^{n}, σ_{ij} ∈ P^{s}, and S_{ij} ∈ P be defined as at the beginning of this section.

a) Update your CoCoA function FirstGB(…) from Tutorial 24 such that it returns not only a σ -Gröbner basis of I, but also the number of pairs (i, j) such that S_{ij} ≠ 0, i.e. such that the normal remainder had to be computed, and the total number of reduction steps which were necessary to compute all those normal remainders. Hint: You will have to modify the function NormalRemainder(…) from Tutorial 15 suitably.

b) Apply your new function FirstGB(…) in the following five cases. Each time, compute a Gröbner basis with respect to DegRevLex and one with respect to Lex.

1) I = (x_{1}^{2} − 2x_{2}^{2} + 3x_{1}, x_{1}^{3} − 2x_{1}x_{2}) in ℚ[x_{1}, x_{2}]

2) I = (x_{1} − 2x_{3}^{4}, x_{2} − 3x_{3}^{5}) in ℚ[x_{1}, x_{2}, x_{3}]

3) I = (x_{1}^{2} − 2x_{2}^{2}, x_{1}^{3} − 3x_{3}^{3}, x_{1}^{4} − x_{4}^{4}) in ℚ[x_{1}, x_{2}, x_{3}, x_{4}]

4) I = (x_{1}^{3} − 4x_{2}^{3}, x_{1}^{5} − 7x_{3}^{5}, x_{1}^{7} − 11x_{4}^{7}) in ℚ[x_{1}, x_{2}, x_{3}, x_{4}]

5) I = (x_{1}^{2} + x_{2}^{3} + x_{3}^{3} − 1, x_{1}^{3} + x_{2}^{4} + x_{3}^{5} − 1) in ℚ[x_{1}, x_{2}, x_{3}]

c) Implement a CoCoA function SecondGB(…) which takes the list G and computes a σ -Gröbner basis of I via Buchberger’s Algorithm 2.5.5, where the pair (i, j) ∈ B is chosen in step 2) according to the normal selection strategy (see Remark 2.5.6.c), and where the optimization which follows from Proposition 2.5.8 is used.

d) Apply your function SecondGB(…) in the cases of b) and compare the results of your counters with those returned by the function FirstGB(…).

e) Given 1 ≤ i < j < k ≤ s, find three terms t, t′, t′′ ∈ 𝕋^{n} such that tσ_{ij} + t′σ_{jk} + t′′σ_{ik} = 0. Prove that one can choose t′′ = 1 if and only if t_{k} divides lcm(t_{i}, t_{j}). Give similar criteria for t = 1 and t′ = 1. The triple (i, j, k) is called a Buchberger triple if one can choose t = 1 or t′ = 1 or t′′ = 1. f) Prove that one can drop a pair (i, j) in the execution of Buchberger’s

Algorithm if it is contained in a Buchberger triple and if the other two pairs have been treated already. Write a CoCoA function ThirdGB(…) which is based on SecondGB(…) and adds this new optimization. To make sure that you do not drop more than one pair from a Buchberger triple, implement a list T which keeps track of the pairs which have been treated already.

g) Apply your function ThirdGB(…) in the cases of b) and determine the improvement which has been achieved.

h) Start again with your implementation SecondGB(…) of Buchberger’s Algorithm, and replace step 4) by the following sequence of instructions. 4a) Increase s′ by one. Append g_{i} = NR_{σ,G}(S_{ij}) to G, and form the set

C = {(i, s′) | 1 ≤ i < s′, γ_{i} = γ_{s′}}. 4b) Delete in C all pairs (j, s′) such that there exists an index i

in {1, …, s′ −1} with the properties that i < j and t_{s′i} divides t_{s′j}. 4c) Delete in C all pairs (i, s′) such that there exists an index j

in {1, …, s′ − 1} with the properties that i < j and t_{s′j} properly

divides t_{s′i}.

4d) Delete in B all pairs (i, j) such that no divisibility occurs between t_{s′i} and t_{s′j} (hence both (i, s′) and (j, s′) survived the preceding

two steps) and we have gcd(t_{is′}, t_{js′}) = 1.

4e) Replace B by B ∪ C and continue with step 2). The fact that this modified algorithm still computes a σ -Gröbner basis of M in finitely many steps will be studied in Volume 2. Implement it in a CoCoA function GoodGB(…), apply this function in the cases of b), and compare the values returned by your counters with the earlier results.

2.6 Hilbert’s Nullstellensatz

The art of doing mathematics consists in finding that special case

which contains all the germs of generality. (David Hilbert)

As in the first chapter, this closing section deviates from the main line of development. It is both a bridge to many applications of Computational Commutative Algebra and a foundation for numerous theoretical advances in later chapters. In the introduction of this book we mentioned that one of the most common areas where Computational Commutative Algebra is applied is algebraic geometry. The fundamental tool to translate statements from algebraic geometry into the language of commutative algebra and back is Hilbert’s Nullstellensatz.

So, what is the relation between geometry and polynomials? Polynomial rings were introduced right at the beginning of this book. Since then, we kept trying to extract information from their intrinsic algebraic structure. But there is another way of looking at polynomials: they can be seen as functions. More precisely, given a polynomial f in the polynomial ring K[x_{1}, …, x_{n}] over a field K and an extension field L ⊇ K, we can evaluate f at each point of L^{n} and obtain a function from L^{n} to L.

Of special importance is then the set of zeros of f, i.e. the set of points (a_{1}, …, a_{n}) ∈ L^{n} such that f(a_{1}, …, a_{n}) = 0. More generally, we can extend the setting to many polynomial equations and look for their common zeros. These are the geometric counterparts of polynomial ideals, and Hilbert’s Nullstellensatz, in its different versions, provides the connection between both kinds of objects.

Since we are trying to be as self-contained as possible, we present a proof of Hilbert’s Nullstellensatz in the current section. At several key points the theory of Gröbner bases will prove very useful. On the way, we shall also obtain a clearer picture of how the set of solutions of a system of polynomial equations depends on the field over which those equations are defined, and on the field where we look for the coordinates of the solution points. For instance, the polynomial x^{4} + 2x^{2} + 1 ∈ ℝ[x] has no zeros in ℝ, but the two zeros i and −i in ℂ. As we shall see, this simple special case already contains the germ of many more general phenomena.

The section begins with the proofs of some algebraic facts which lead to the field theoretic version of Hilbert’s Nullstellensatz (see Theorem 2.6.6). This theorem can also be viewed as a structure theorem for maximal ideals in polynomial rings over algebraically closed fields (see Corollary 2.6.9). As a consequence, we are able to interpret the zeros of an ideal I in such a polynomial ring as the set of maximal ideals containing I (see Proposition 2.6.11). For instance, the zeros of x^{4} + 2x^{2} + 1 ∈ ℂ[x] correspond to the maximal ideals (x + i) and (x − i) containing this polynomial.

Given a field extension K ⊂ L, an important result is proved about the behaviour of ideals under extension from K[x_{1}, …, x_{n}] to L[x_{1}, …, x_{n}]. This result is the key to the weak form of Hilbert’s Nullstellensatz (see Theorem 2.6.13) which provides us with an effective way to check whether a given polynomial ideal has zeros in \overline{K}^{n}, where \overline{K} is the algebraic closure of K. For our ideal (x^{4} + 2x^{2} + 1) ⊆ ℝ[x], the easy observation 1 ∉ (x^{4} + 2x^{2} + 1) suffices to conclude that it has zeros in the algebraic closure ℂ of ℝ.

Finally, we prove the Nullstellensatz in its full generality (see Theorem 2.6.16). It says that the operation of forming the vanishing ideal of a subset of \overline{K}^{n} is an inverse to the operation of taking the set of zeros of a polynomial ideal if one considers radical ideals only. This highlights the importance of the ideal theoretic operation of forming the radical of an ideal. In the case of the principal ideal (x^{4} + 2x^{2} + 1) in ℂ[x], it says that the vanishing ideal of its set of zeros {i, −i} is its radical ideal (x^{2} + 1).

2.6.A The Field-Theoretic Version

Let K be an arbitrary field. Many algebraic geometers use the following terminology.

Definition 2.6.1. A finitely generated K -algebra is also called an affine K -algebra.

According to Corollary 1.1.14, such algebras are of the form P/I for some polynomial ring P = K[x_{1}, …, x_{n}] and some ideal I ⊆ P. Now we present three lemmas leading up to the first theorem of this section which is also called the field-theoretic version of Hilbert’s Nullstellensatz. Recall that the field of fractions of a polynomial ring P = K[x_{1}, …, x_{n}] is usually denoted by Q(P) = K(x_{1}, …, x_{n}).

Lemma 2.6.2. Let x be an indeterminate over our field K. Then K(x) is not an affine K -algebra.

Proof. Suppose K(x) = K[\frac{f_{1}}{g_{1}} , …, \frac{f_{s}}{g_{s}}] for some f_{1}, …, f_{s}, g_{1}, …, g_{s} ∈ K[x] such that g_{1} ·g_{2} ⋯ g_{s} ≠ 0. Since \frac{1}{x} ∉ K[x], we may assume g_{1} ·g_{2} ⋯ g_{s} ∉ K. Then the fraction \frac{1}{1+g_{1}·g_{2}···g_{s}} can be written as a polynomial expression in \frac{f_{1}}{g_{1}} , …, \frac{f_{s}}{g_{s}} . Clearing denominators, we get (g_{1}·g_{2} ⋯ g_{s})^{i} = (1+g_{1}·g_{2} ⋯ g_{s})·h for suitable i > 0 and h ∈ K[x]. Now K[x] is a factorial domain (see Theorem 1.2.13), but clearly no irreducible factor of the non-constant polynomial 1 + g_{1} · g_{2} ⋯ g_{s} can divide one of the polynomials g_{1}, …, g_{s}. This contradiction finishes the proof. □

Lemma 2.6.3. Let A ⊆ B ⊆ C be three rings.

a) If B is a finitely generated A-module, then it is also a finitely generated A-algebra. b) If B is a finitely generated A-algebra and if C is a finitely generated

B -algebra, then C is a finitely generated A-algebra.

Proof. Let {b_{1}, …, b_{s}} be a set of generators of B as an A-module. Then B = Ab_{1} + ⋯ + Ab_{s} ⊆ A[b_{1}, …, b_{s}] ⊆ B implies claim a). For the proof of b), we use Corollary 1.1.14 to write B = A[x_{1}, …, x_{n}]/I with an ideal I ⊆ A[x_{1}, …, x_{n}] and C = B[y_{1}, …, y_{m}]/J with an ideal J ⊆ B[y_{1}, …, y_{m}]. Then the claim follows from

C ≅ A[x_{1}, …, x_{n}, y_{1}, …, y_{m}]/(I · A[x_{1}, …, x_{n}, y_{1}, …, y_{m}] + π^{−1}(J))

where π : A[x_{1}, …, x_{n}, y_{1}, …, y_{m}] ⟶ B[y_{1}, …, y_{m}] is the canonical homomorphism. □

The next result is deeper. We want to show that under certain circumstances a K -subalgebra of an affine K -algebra is an affine K -algebra. The following example shows that this is not always the case.

Example 2.6.4. The K -subalgebra K[x, xy, xy^{2}, xy^{3}, …] of K[x, y] is not finitely generated. Namely, for every finite set of elements of this subalgebra, the finitely many terms in the support of those polynomials can be written as polynomials in finitely many terms x, xy, …, xy^{i}. But since we have xy^{i} ∉ K[x, xy, …, xy^{i−1}] for i ≥ 2, those polynomials do not generate the subalgebra.

Lemma 2.6.5. Let A and B be two K -algebras such that A ⊆ B. Assume that B is an affine K -algebra and a finitely generated A-module. Then A is an affine K -algebra.

Proof. Let {b_{1}, …, b_{s}} be a set of generators of B as a K -algebra and {β_{1}, …, β_{t}} a set of generators of B as an A-module. Then there are elements a_{ij}, a′_{ijk} ∈ A such that we have expressions

b_{i} = ∑_{j=1}^{t} a_{ij}β_{j} for i = 1, …, s and β_{i}β_{j} = ∑_{k=1}^{t} a′_{ijk}β_{k} for i, j = 1, …, t.

Let A_{0} be the K -subalgebra of A generated by all elements a_{ij} and a′_{ijk}. It is an affine K -algebra, hence Noetherian by Theorem 2.4.6. Assume for a moment that we know that B is a finitely generated A_{0} -module. Then B is a Noetherian A_{0} -module by Theorem 2.4.6 again. Thus A, an A_{0} -submodule of B, is a finitely generated A_{0} -module. Therefore A is a finitely generated A_{0} -algebra by Lemma 2.6.3.a. Since A_{0} is an affine K -algebra, also A is an affine K -algebra by Lemma 2.6.3.b.

Consequently, to finish the proof it suffices to show that B is a finitely generated A_{0} -module. To this end we observe that every element of B is a polynomial expression in β_{1}, …, β_{t} with coefficients in A_{0} because of the first set of expressions above. Using the second set of expressions, we can replace every product β_{i}β_{j} by an element of A_{0}β_{1} + ⋯ + A_{0}β_{t}. If we iterate those substitutions, we see that every element of B is in A_{0}β_{1} + ⋯ + A_{0}β_{t} + A_{0} , i.e. the A_{0} -module B is generated by {1, β_{1}, …, β_{t}}. □

Theorem 2.6.6. (Field-Theoretic Version of Hilbert’s Nullstellensatz) Let P = K[x_{1}, …, x_{n}] and 𝔪 a maximal ideal of P.

a) For every i ∈ {1, …, n}, the intersection 𝔪 ∩ K[x_{i}] is a non-zero ideal.

b) The affine K -algebra P/𝔪 is a finitely generated K -vector space.

Proof. First we show that a) implies b). By assumption, for i = 1, …, n, the intersection 𝔪 ∩ K[x_{i}] is a non-zero principal ideal generated by some non-constant polynomial f_{i} ∈ K[x_{i}]. Then the ideal 𝔫 = (f_{1}, …, f_{n}) ⊆ P is contained in 𝔪 and we have a surjective homomorphism P/𝔫 −↠ P/𝔪. Therefore it suffices to show that P/𝔫 is a finitely generated K -vector space. Now {f_{1}, …, f_{n}} is a Gröbner basis of 𝔫 with respect to every term ordering σ by Corollary 2.5.10. If we write LT_{σ}(f_{i}) = x_{i}^{d_{i}} with d_{i} ≥ 1 for i = 1, …, n, we may deduce from Corollary 2.4.11 that a K -vector space basis of P/𝔫 is given by the finite set of residue classes of the terms x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} such that 0 ≤ α_{i} < d_{i} for i = 1, …, n.

Now we prove a) by induction on n. If n = 1, the ideal 𝔪 is a principal ideal generated by an irreducible polynomial, and the claim holds. If n > 1, we denote the affine K -algebra P/𝔪 by B. Let i ∈ \{1, …, n\}, let \overline{x}_{i} be the residue class of x_{i} in B, and let A be the field of fractions of the integral domain K[\overline{x}_{i}] contained in the field B. Clearly, considered as an A-alge-bra, B is generated by \{\overline{x}_{1}, …, \overline{x}_{i−1}, \overline{x}_{i+1}, …, \overline{x}_{n}\}. By induction and the implication shown above, B is a finitely generated A-vector space. Therefore, by Lemma 2.6.5, the field A is a finitely generated K -algebra. Then \overline{x}_{i} is not an indeterminate over K by Lemma 2.6.2, and hence 𝔪 ∩ K[x_{i}] is different from (0). □

Condition a) of the above theorem does not hold for more general rings, as the following example shows. (In this example we shall use some facts about power series and Laurent series rings which will be discussed more thoroughly in Chapter V. The inexperienced reader may safely skip it.)

Example 2.6.7. Let R = K[[x]][y] be the polynomial ring in the indeterminate y over the univariate power series ring K[[x]] over a field K. Then the principal ideal 𝔪 = (xy − 1) is maximal, because R/(xy − 1) ≅ K[[x]]_{x} is a field. But we have 𝔪 ∩ K[y] = (0).

Definition 2.6.8. A field K is called algebraically closed if every irreducible polynomial in K[x] is linear. This implies that every polynomial f ∈ K[x] of degree d can be written as

f(x) = c (x − a_{1})^{α_{1}}(x − a_{2})^{α_{2}} ⋯ (x − a_{s})^{α_{s}}

where c, a_{1}, …, a_{s} ∈ K and α_{1}, …, α_{s} ∈ ℕ are such that a_{1}, …, a_{s} are pairwise distinct and α_{1} + ⋯ + α_{s} = d.

For instance, the Fundamental Theorem of Algebra says that the field of complex numbers ℂ is algebraically closed. The fields ℝ and ℚ are not algebraically closed, since the quadratic polynomial x^{2} + 1 is irreducible over them.

An important result which you should know is that, for every field K, there exists an algebraic extension field \overline{K} which is an algebraically closed field. (And if you do not know it, you can look for instance at [La70], Ch. 7.) The field \overline{K} is unique up to a K -algebra isomorphism and is called the algebraic closure of K. For example, the field ℂ is the algebraic closure of ℝ, since it is algebraically closed and an algebraic extension of ℝ. The algebraic closure of ℚ is the field of algebraic numbers \overline{ℚ} discussed in Tutorial 18.

The field-theoretic version of Hilbert’s Nullstellensatz can also be interpreted as a structure theorem for maximal ideals in polynomial rings over algebraically closed fields.

Corollary 2.6.9. Let K be an algebraically closed field, and let 𝔪 be a maximal ideal in K[x_{1}, …, x_{n}]. Then there exist elements a_{1}, …, a_{n} in K such that

𝔪 = (x_{1} − a_{1}, …, x_{n} − a_{n})

Proof. Theorem 2.6.6 yields non-zero polynomials f_{1}, …, f_{n} ∈ 𝔪 such that f_{i} ∈ K[x_{i}] for i = 1, …, n. Every polynomial f_{i} factorizes completely into linear factors, since K is algebraically closed. Moreover, the ideal 𝔪 is maximal, hence prime. This implies that it contains one of the linear factors of each polynomial f_{i}, say x_{i} − a_{i}. Then 𝔪 contains the ideal (x_{1} − a_{1}, …, x_{n} − a_{n}) which, on the other hand, is a maximal ideal. Thus they must be equal and the proof is complete. □

2.6.B The Geometric Version

In the remainder of this section we want to explain the geometric versions of Hilbert’s Nullstellensatz. The German word “Nullstellensatz” literally means “zero-places-proposition”. Let us define what this refers to.

Definition 2.6.10. Let K ⊆ L be a field extension, let \overline{K} be the algebraic closure of K, and let P = K[x_{1}, …, x_{n}].

a) An element (a_{1}, …, a_{n}) ∈ L^{n} (which we shall also call a point of L^{n}) is said to be a zero of a polynomial f ∈ P in L^{n} if f(a_{1}, …, a_{n}) = 0, i.e. if the evaluation of f at the point (a_{1}, …, a_{n}) is zero. The set of all zeros of f in L^{n} will be denoted by Z_{L}(f). If we simply say that (a_{1}, …, a_{n}) is a zero of f, we mean (a_{1}, …, a_{n}) ∈ \overline{K}^{n} and f(a_{1}, …, a_{n}) = 0. b) For an ideal I ⊆ P, the set of zeros of I in L^{n} is defined as

Z_{L}(I) = {(a_{1}, …, a_{n}) ∈ L^{n} | f(a_{1}, …, a_{n}) = 0 for all f ∈ I}

Again we call the set of zeros of I in \overline{K}^{n} simply the set of zeros of I and denote it by Z(I). Later we shall also call Z(I) the affine variety defined by I.

It is easy to see that the set of zeros Z_{L}(f) of a polynomial f ∈ P in L^{n} agrees with the set of zeros Z_{L}((f)) of the principal ideal it generates. Moreover, if an ideal I ⊆ P is generated by a set of polynomials {f_{1}, …, f_{s}}, then we have Z_{L}(I) = ∩_{i=1}^{s}Z_{L}(f_{i}).

Algebraically, the set of zeros of an ideal corresponds to a set of maximal ideals in the polynomial ring, as our next proposition shows.

Proposition 2.6.11. Let K be an algebraically closed field, let I be a proper ideal in P = K[x_{1}, …, x_{n}], and let Σ be the set of maximal ideals in P which contain I. Then the map

φ : Z(I) ⟶ Σ

defined by φ(a_{1}, …, a_{n}) = (x_{1} − a_{1}, …, x_{n} − a_{n}) is bijective.

Proof. For p = (a_{1}, …, a_{n}) ∈ K^{n}, we denote by 𝔪_{p} = (x_{1} −a_{1}, …, x_{n} −a_{n}) the corresponding maximal ideal in P. Then the map φ can be described by φ(p) = 𝔪_{p}. First we prove that φ is well-defined. For a point p ∈ Z(I), all polynomials in I vanish at p. Using the Division Algorithm 1.6.4, we then see that those polynomials belong to 𝔪_{p}.

The map φ is clearly injective. Hence it suffices to show that it is surjective. We choose a maximal ideal 𝔪 ∈ Σ. By Corollary 2.6.9, there exists a point p = (a_{1}, …, a_{n}) ∈ K^{n} such that 𝔪 = 𝔪_{p}. By the definition of Σ, we have 𝔪_{p} ⊇ I. It follows that p ∈ Z(I), and the proof is complete. □

Our next result is useful for comparing the set of zeros of I in L^{n} for different extension fields L of K. Remember that if K ⊆ L is a field extension and I is an ideal of P = K[x_{1}, …, x_{n}], we use the notation IL[x_{1}, … x_{n}] to denote the ideal of L[x_{1}, … x_{n}] generated by the set I.

Proposition 2.6.12. Let K ⊆ L be a field extension and I an ideal of K[x_{1}, …, x_{n}]. Then

IL[x_{1}, …, x_{n}] ∩ K[x_{1}, …, x_{n}] = I

In particular, we have IL[x_{1}, …, x_{n}] = L[x_{1}, …, x_{n}] if and only if we have I = K[x_{1}, …, x_{n}].

Proof. Obviously we only need to prove that the left-hand side is contained in I. We choose a term ordering σ on 𝕋^{n} and let G = {g_{1}, …, g_{s}} be a σ -Gröbner basis of I. From Lemma 2.4.16 it follows that the set G is also a σ -Gröbner basis of the ideal IL[x_{1}, …, x_{n}]. Now let f be a polynomial in IL[x_{1}, …, x_{n}] ∩ K[x_{1}, …, x_{n}]. If we compute the normal form NF_{σ}(f) using the Division Algorithm 1.6.4, we only perform operations inside K[x_{1}, …, x_{n}], and therefore f − NF_{σ}(f) is in the ideal generated in K[x_{1}, …, x_{n}] by the set of polynomials {g_{1}, …, g_{s}}, which is I. But f ∈ IL[x_{1}, …, x_{n}] implies NF_{σ}(f) = 0, hence we have f ∈ I. □

The questions which ideals have zeros and how one can check that are now answered by the following theorem and its corollary.

Theorem 2.6.13. (Weak Nullstellensatz) Let K be a field, and let I be a proper ideal of P = K[x_{1}, …, x_{n}], i.e. let I ⊂ P. Then Z(I) ≠ ∅.

Proof. Let \overline{K} be the algebraic closure of K, and let \overline{P} = \overline{K}[x_{1}, …, x_{n}]. Then I\overline{P} is a proper ideal of \overline{P} by Proposition 2.6.12. Since we know that \overline{P} is Noetherian, the ideal I\overline{P} is contained in a maximal ideal 𝔪 of \overline{P} by Proposition 2.4.5.c. Now Corollary 2.6.9 says that there is a point (a_{1}, …, a_{n}) ∈ \overline{K}^{n} such that 𝔪 = (x_{1} − a_{1}, …, x_{n} − a_{n}). Hence (a_{1}, …, a_{n}) is a zero of 𝔪, and therefore also of I ⊆ I\overline{P} ⊆ 𝔪. □

Of course, one cannot hope to get Z_{K}(I) ≠ ∅ if K is not algebraically closed, since for instance Z_{ℚ}(x^{2} + 1) = ∅. Moreover, although the question of whether Z_{L}(I) = ∅ or not does not depend on which algebraically closed field L ⊇ K we choose, the set Z_{L}(I) itself clearly does. For instance, if I = (y − x^{2}) ⊆ ℚ[x, y], then (π, π^{2}) ∈ Z_{ℂ}(I), but (π, π^{2}) ∉ Z\overline{ℚ}(I).

Corollary 2.6.14. Let L be a field which contains the algebraic closure of K, and let I be an ideal of K[x_{1}, …, x_{n}]. Then the following conditions are equivalent.

a) Z_{L}(I) = ∅

b) 1 ∈ I In particular, this result holds if K is the field of definition of I.

Proof. Clearly b) implies a). For the converse, we observe that Z_{L}(I) = ∅ implies Z(I) = ∅, and then 1 ∈ I by the Weak Nullstellensatz. □

Recall that, for a ring R and an ideal I in R, the set {r ∈ R | r^{i} ∈ I for some i ≥ 0} is again an ideal of R which is called the radical of I and denoted by \sqrt{I}. An ideal I such that I = \sqrt{I} is called a radical ideal. Equivalently, an ideal I is a radical ideal in R if the residue class ring R/I has no non-zero nilpotent elements. Thus, for instance, prime ideals are radical ideals.

In the case of an ideal I of K[x_{1}, …, x_{n}], it is easy to see that I and \sqrt{I} have the same set of zeros. Thus the operation of assigning the set of zeros to an ideal I ⊆ K[x_{1}, …, x_{n}] is not one-to-one. In order to study this operation more closely, let us define an operation going in the other direction.

Definition 2.6.15. Let K ⊆ L be a field extension, and let S ⊆ L^{n}. Then the set of all polynomials f ∈ K[x_{1}, …, x_{n}] such that f(a_{1}, …, a_{n}) = 0 for all points (a_{1}, …, a_{n}) ∈ S forms an ideal of the polynomial ring K[x_{1}, …, x_{n}]. This ideal is called the vanishing ideal of S in K[x_{1}, …, x_{n}] and denoted by I(S).

Using this notation, the strong version of Hilbert’s Nullstellensatz says that the operation I(…) is an inverse to Z(…) if one considers only radical ideals in polynomial rings over algebraically closed fields.

Theorem 2.6.16. (Hilbert’s Nullstellensatz)

Let K be an algebraically closed field, and let I be a proper ideal of K[x_{1}, …, x_{n}]. Then

I(Z(I)) = \sqrt{I}

Proof. To show the inclusion I(Z(I)) ⊇ \sqrt{I}, suppose that a polynomial f ∈ P = K[x_{1}, …, x_{n}] satisfies f^{i} ∈ I for some i ≥ 0. Then we have f^{i}(a_{1}, …, a_{n}) = 0 for every point (a_{1}, …, a_{n}) ∈ Z(I). Thus we also have f(a_{1}, …, a_{n}) = 0 for every point (a_{1}, …, a_{n}) ∈ Z(I), i.e. f ∈ I(Z(I)).

To prove the other inclusion, we may assume that I ≠ (0). We choose f ∈ I(Z(I)) \ {0} and a system of generators {g_{1}, …, g_{s}} of I. Let x_{n+1} be a new indeterminate, and consider the ideal I′ = IP [x_{n+1}] + (x_{n+1}f − 1) in the polynomial ring P [x_{n+1}]. For every point (a_{1}, …, a_{n+1}) ∈ Z(I′) we have a_{n+1}f(a_{1}, …, a_{n}) = 1 and g_{i}(a_{1}, …, a_{n}) = 0 for i = 1, …, s. But then (a_{1}, …, a_{n}) ∈ Z(I) and f(a_{1}, …, a_{n}) ≠ 0 contradict the choice of f. Consequently, such a point does not exist, i.e. Z(I′) = ∅, and the Weak Nullstellensatz 2.6.13 yields 1 ∈ I′.

Therefore there are polynomials h, h_{1}, …, h_{s} ∈ P [x_{n+1}] such that 1 = ∑_{i=1}^{s} h_{i}·g_{i}+h·(x_{n+1}f−1). In the field K(x_{1}, …, x_{n}, x_{n+1}) we may substitute \frac{1}{f} for x_{n+1} . We get the equality

1 = ∑_{i=1}^{s} h_{i}(x_{1}, …, x_{n}, \frac{1}{f}) · g_{i}

By clearing the denominators, we find f^{m} = ∑_{i=1}^{s} h̃_{i} · g_{i} for some m ≥ 0 and suitable polynomials h̃_{1}, …, h̃_{s} ∈ P, which means that f ∈ \sqrt{I}. □

Our final result in this section provides a reformulation of Hilbert’s Nullstellensatz which will prove useful in the final section of this book.

Corollary 2.6.17. Let K be a field, let I be a proper ideal in the polynomial ring P = K[x_{1}, …, x_{n}], let \overline{K} be the algebraic closure of K, let \overline{P} = \overline{K}[x_{1}, …, x_{n}], and let f be a polynomial in P. If f belongs to all maximal ideals containing I\overline{P}, then f ∈ \sqrt{I}.

Proof. First we observe that Proposition 2.6.11 implies f ∈ I(Z(I\overline{P})). This ideal equals \sqrt{I\overline{P}} by Hilbert’s Nullstellensatz 2.6.16. Therefore there exists a number i ∈ ℕ such that f^{i} ∈ I\overline{P}. The claim now follows from Proposition 2.6.12. □

Exercise 1. Give a direct proof for the fact that condition b) of Theorem 2.6.6 implies condition a) of that theorem.

Exercise 2. Let K be a field and f(x) ∈ K[x] an irreducible polynomial. Find a maximal ideal 𝔪 in K[x, y] which contains the ideal I = (f(x), f(y)), and compute the intersection of 𝔪 with K[x] and K[y].

Exercise 3. (Structure of Maximal Ideals in ℝ[x_{1}, …, x_{n}]) Let 𝔪 be a maximal ideal in ℝ[x_{1}, …, x_{n}].

a) Let n = 1. Show that 𝔪 is either generated by a polynomial of type x_{1} − a with a ∈ ℝ, or a polynomial of type x_{1}^{2} + ax_{1} + b with a, b ∈ ℝ and a^{2} − 4b < 0. Hint: Use the fact that if a + ib is a complex zero of a polynomial in ℝ[x], then also a−ib is a zero, to characterize irreducible polynomials in ℝ[x].

b) Let n = 2 and f_{1} = x_{1}^{2} + a_{1}x_{1} + b_{1} , f_{2} = x_{2}^{2} + a_{2}x_{2} + b_{2} with a_{1}, b_{1}, a_{2}, b_{2} ∈ ℝ and a_{1}^{2} − 4b_{1} < 0, a_{2}^{2} − 4b_{2} < 0. Show that the ideal I = (f_{1}, f_{2}) is not maximal in ℝ[x_{1}, x_{2}]. Hint: Use the fact that ℝ[x_{1}, x_{2}]/(f_{1}) is isomorphic to ℂ[x_{2}].

c) Let n = 2 and assume that x_{1}^{2} + a_{1}x_{1} + b_{1} ∈ 𝔪 with a_{1}, b_{1} ∈ ℝ and a_{1}^{2} − 4b_{1} < 0. Show that there exist a_{2}, b_{2} ∈ ℝ such that we have 𝔪 = (x_{1}^{2} + a_{1}x_{1} + b_{1}, x_{2} − a_{2}x_{1} − b_{2}).

d) In the general case prove the following fact: either there exist numbers a_{1}, …, a_{n} ∈ ℝ such that 𝔪 = (x_{1} − a_{1}, …, x_{n} − a_{n}) or, up to a permutation of the indeterminates, there exist a_{1}, b_{1}, a_{2}, b_{2} …, a_{n}, b_{n} ∈ ℝ such that a_{1}^{2}−4b_{1} < 0 and 𝔪 = (x_{1}^{2}+a_{1}x_{1}+b_{1}, x_{2}−a_{2}x_{1}−b_{2}, …, x_{n}− a_{n}x_{1} − b_{n}).

Exercise 4. Let f ∈ ℚ[x, y] be a non-constant polynomial. Prove that Z_{ℚ}(f) ⊂ Z(f).

Exercise 5. Let K ⊆ L be a field extension, let P = K[x_{1}, …, x_{n}], let f, f_{1}, …, f_{s} ∈ P , and let I = (f_{1}, …, f_{s}).

a) Show that Z_{L}(f) = Z_{L}((f)).

b) Show that Z_{L}(I) = ∩_{i=1}^{s}Z_{L}(f_{i}).

c) Show that Z_{L}(I) = Z_{L}(\sqrt{I}).

Exercise 6. Let K ⊆ L be a field extension, let I be an ideal in K[x_{1}, …, x_{n}], and let S be a subset of L^{n}.

a) Show that I(Z_{L}(I)) ⊇ I.

b) Show that Z_{L}(I(S)) ⊇ S.

Exercise 7. Let R be a ring, and let I and J be ideals in R. Prove the following rules.

a) \sqrt{\sqrt{I}} = \sqrt{I}

b) \sqrt{I ∩ J} = \sqrt{IJ} = \sqrt{I} ∩ \sqrt{J}

c) \sqrt{I^{i}} = \sqrt{I} for all i ≥ 1.

d) If I is an intersection of prime ideals, then \sqrt{I} = I.

e) \sqrt{\sqrt{I} + \sqrt{J}} = \sqrt{I + J}

Exercise 8. Let K be an algebraically closed field and I a proper ideal of P = K[x_{1}, …, x_{n}]. In this exercise we use the Zariski topology on K^{n} defined in Tutorial 27. The ideal I is said to be reducible if it is the intersection of two strictly bigger ideals. A closed set of a topological space is said to be reducible if it is the union of two properly contained closed subsets.

a) Show that if I is reducible, then Z(I) is reducible.

b) Give an example which shows that the converse is not true.

c) Show that the converse of a) is true if I is a radical ideal.

d) Let I be a radical ideal. Prove that the following conditions are equivalent.

1) There exist two ideals I_{1}, I_{2} ⊂ P such that I = I_{1} ∩ I_{2} and I_{1} + I_{2} = P .

2) Z(I) is disconnected, i.e. it is the union of two disjoint closed sets.

Exercise 9. Let K be an algebraically closed field, and let I be a proper radical ideal of P = K[x_{1}, …, x_{n}].

a) Prove that Z(I) is finite if and only if I is of the form

I = ⋂_{i=1}^{s} (x_{1} − a_{i1}, …, x_{n} − a_{in})

with pairwise different points (a_{11}, …, a_{1n}), …, (a_{s1}, …, a_{sn}) ∈ K^{n}.

b) Show that if a) holds, then Z_{L}(I) = Z(I) for every extension field L ⊇ K.

Tutorial 26: Graph Colourings

Suppose we are given 3 different colours and a graph Γ having n nodes and at most one arch between any two nodes, e.g.

• • •  • • •  • 1 2 3  4  5  6  7_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}  _{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}  _{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}  _{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}  _{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}  _{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}

Our goal is to find out if the nodes can be coloured in such a way that no arch connects two nodes of the same colour. In order to use the theory of Gröbner bases to solve this problem, we introduce the following notation.

The colours will be called −1, 0, and 1. They will be identified with the elements of the field 𝔽_{3} = ℤ/(3). For i = 1, …, n, we choose an indeterminate x_{i} and form the polynomial ring P = 𝔽_{3}[x_{1}, …, x_{n}]. We shall identify a colouring of the graph with a point of 𝔽_{3}^{n} such that the i^{th} coordinate of the point corresponds to the colour of the i^{th} node.

a) Show that the set of zeros of the ideal (x_{1}^{3} − x_{1}, …, x_{n}^{3} − x_{n}) is precisely the set of all colourings.

b) Prove that the i^{th} and j^{th} node of the graph have different colours if and only if the colouring is a zero of the polynomial x_{i}^{2} + x_{i}x_{j} + x_{j}^{2} − 1.

c) In addition, we may assume that the first and second nodes are connected, that the first node has colour “0”, and that the second node has colour “1”. What polynomial equations does this imply for the colourings under consideration?

d) Write a CoCoA program Colouring(…) which takes a list of pairs from {1, …, n}^{2} representing the arches and computes an ideal I ⊆ P whose zeros are precisely the colourings of the graph represented by those pairs which satisfy our additional conditions.

e) Apply your function Colouring(…) to the graph above. Then use CoCoA to compute the reduced Lex-Gröbner basis of this ideal. Does the graph have a colouring of the desired kind? If yes, how many different ones? (Hint: Use Hilbert’s Nullstellensatz to interpret the answer of your calculation.)

f) Consider the graph formed by connecting the center of a regular 7-gon to its vertices. (It has 8 nodes and 14 arches.) Use CoCoA and the Weak Nullstellensatz to show that this graph cannot be coloured as required above.

Tutorial 27: Affine Varieties

Let K ⊆ L be a field extension. For every ideal I in K[x_{1}, …, x_{n}] we consider the set Z_{L}(I) ⊆ L^{n} as given in Definition 2.6.10. For the moment, let us call a subset of L^{n} a zero-set if it is of the form Z_{L}(I) ⊆ L^{n} for some ideal I ⊆ K[x_{1}, …, x_{n}].

a) Prove the following claims.

1) ∅ is a zero-set.

2) L^{n} is a zero-set.

3) If E_{1}, …, E_{s} are zero-sets, then ∪_{i=1}^{s}E_{i} is a zero-set.

4) If J is a set of indices and {E_{j}}_{j∈J} a set of zero-sets indexed by J, then ∩_{j∈J}E_{j} is a zero-set.

Deduce that the zero-sets of L^{n} can be taken as the closed sets of a topology, which we denote by Top_{K,L}. If K = L, then Top_{K,K} is called the Zariski topology on K^{n}. Moreover, K^{n} with the Zariski topology is called the n-dimensional affine space over K and denoted by 𝔸_{K}^{n}. Zero-sets in \overline{K}^{n} are called affine varieties (or affine sets).

b) Let p_{1} and p_{2} be two distinct points in K^{n}. Then the set of points \overline{p_{1}p_{2}} = \{p_{1} + λ(p_{2} − p_{1}) | λ ∈ K\} is called the line passing through p_{1} and p_{2} . Show that \overline{p_{1}p_{2}} is a closed set in the Zariski topology.

c) Let K ⊂ K′ ⊆ L be field extensions and Top_{K,L}, Top_{K′,L} the corresponding topologies on L^{n}. Show that Top_{K′,L} is finer than Top_{K,L}, i.e. that every closed set with respect to Top_{K,L} is also closed with respect to Top_{K′,L}.

d) Let K be algebraically closed and consider the Zariski topology on K^{n}. Show that there is a bijection between the set of radical ideals in K[x_{1}, …, x_{n}] and the closed sets in 𝔸_{K}^{n}. Then show that the statement is false if K is not algebraically closed.

e) Let K be algebraically closed, let I be an ideal in P = K[x_{1}, …, x_{n}], and assume that the dimension of P/I as a vector space over K is finite. Then show that Z(I) is a finite set of points. Hint: For i = 1, …, n, show that I ∩ K[x_{i}] = (f_{i}) ≠ (0) and conclude that Z(I) ⊆ Z((f_{1}, …, f_{n})).

f) Let P = ℚ[x_{1}, …, x_{n}], and let I be an ideal in P. Write two CoCoA programs which perform the following tasks.

1) Given I and a point p ∈ ℚ^{n}, check if p ∈ Z_{ℚ}(I) and return the corresponding Boolean value.

2) If I ≠ (0), find a point p which is not in Z_{ℚ}(I) and return it.

g) Let S be a subset of 𝔸_{K}^{n}. Show that the set of all Zariski-closed subsets of 𝔸_{K}^{n} containing S has a unique minimal element (with respect to inclusion). This zero-set is called the Zariski closure of S.

h) Let K be an algebraically closed field, and let S ⊆ 𝔸_{K}^{n}. Prove that the Zariski closure of S is given by Z(I(S)).

3. First Applications

Ripeness is all. [...]

Also the story of the moon and the bonfires, I knew it.

However, I began to realize that I did not know anymore that I knew it. (Cesare Pavese)

It has already been a long journey. From the snowy hills down to the valleys and up again, we have encountered many milestones and discovered impressive tools. Meanwhile time has passed, the colours of the landscape have changed, and now it is time to go back to the hills and do the harvesting.

Do you realize that you have accumulated the knowledge of many facts which you might be able to use now? Possibly you have already forgotten that you knew them. Let us remind you of the factoriality of polynomial rings over fields, and of the games played in Chapter 1 with terms and term orderings. Then, in Chapter 2, we planned a strategy, made our moves, and discovered Gröbner bases, Buchberger’s Algorithm, Hilbert’s Nullstellensatz, and numerous other devices. In particular, by now you should be able to see clearly how fundamental the notion of a syzygy is, for instance because it plays an essential role in the construction of Buchberger’s Algorithm.

However, the importance of syzygies in Algebra goes far beyond what we have seen up to now. Therefore it is highly relevant to be able to compute them. In fact, our first achievement in this chapter is the solution of the problem of computing Syz_{P} (g_{1}, …, g_{s}) for arbitrary vectors g_{1}, …, g_{s} ∈ P^{r}, where P = K[x_{1}, …, x_{n}] is a polynomial ring over a field K (see Theorem 3.1.8). Exploiting this new ability, we will then discover ways to explicitly perform basic operations among ideals and modules such as intersections, colon ideals, and colon modules (see Section 3.2).

Next, we enjoy a trip into the realms of Computational Linear Algebra and Computational Homological Algebra. Using syzygy computations, we can find presentations for the kernel and the image of a linear map between finitely generated P -modules, and we can lift a linear map along another one. Even more challenging, but within our grasp, is the task of computing presentations of Hom-modules. Using the ingredients gathered earlier, we shall concoct an algorithm in Subsection 3.3.B.

Having safely put in store many fruits of syzygy calculations, we move to the next orchard. Elimination theory provides us with a particularly fertile soil for further applications. This is a fascinating subject whose roots lie in classical geometry, where it is related to projections. From the point of view of Computational Commutative Algebra, we have to perform an important switch. From here on we are no longer allowed to use an arbitrary module term ordering. Instead, we have to limit ourselves to the more restrictive class of elimination orderings.

After we explain the main theorem for computing elimination modules in Section 3.4, many other ripening fruits will become ready for picking. Using the method of tag variables, we obtain new ways to perform the basic operations on modules. Then, in Section 3.5, we learn how to compute saturations and how to check radical membership.

Other important applications are collected in Section 3.6, where we discuss ring homomorphisms. Among other things, we show how to find presentations for the kernel and the image of a homomorphism of finitely generated algebras, how to solve the implicitization problem, how to compute minimal polynomials of elements in affine algebras, how to check membership in finitely generated subalgebras, and how to analyze surjective and bijective homomorphisms between polynomial rings.

The final Section 3.7 of this chapter, and hence of this volume, represents the ultimate act of harvesting. It is devoted to the problem of solving systems of polynomial equations effectively. At that stage of your reading, you will be challenged to recall almost all the knowledge that you gathered during the journey, to become aware of the skills and the tools which you have learned, and to use them to dig out the roots of systems of equations. Our last field of investigation also contains algorithms for checking whether the set of solutions of a system of equations is finite, for computing squarefree parts of polynomials, and for finding radicals of zero-dimensional ideals.

And what then? There are countless other applications of Gröbner bases, and new ones are discovered almost daily. But since we wanted to finish this book before the new millennium, we decided to stop here. Other applications and interesting topics will be contained in Volume 2. So, see you later!

Some Words About Notation

Such is the advantage of a well-constructed language

that its simplified notation often becomes

the source of profound theories. (Pierre-Simon de Laplace)

Before moving into medias res, let us mention a problem which could come to haunt us, namely the choice of a convenient notation. As usual, let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let r ≥ 1, and let G = (g_{1}, …, g_{s}) be a tuple of vectors in P^{r}.

In this situation, the question arises how we should interpret G. It is clear that tuples of vectors and matrices representing them are different objects. But to ease the notation and to keep the usage of symbols under control, it would be convenient to identify them in a natural way. The key point is that when we look at G = (g_{1}, …, g_{s}), we see that it is already written as a row. Thus we are naturally lead to think of the vectors g_{1}, …, g_{s} as column vectors, and to identify G with the matrix having those columns.

Indeed, from now on we shall make this identification. It allows us to interpret an expression ∑_{i=1}^{s} f_{i}g_{i} as the result of a matrix multiplication in the following way.

∑_{i=1}^{s} f_{i}g_{i} = (g_{1}, …, g_{s}) ( f_{1} ; ⋮ ; f_{s} )

Here the row (g_{1}, …, g_{s}) is written as a tuple, with the appropriate commas, and interpreted as a matrix. Now recall that a syzygy of G has been defined as a tuple of polynomials (f_{1}, …, f_{s}) ∈ P^{s} such that ∑_{i=1}^{s} f_{i}g_{i} = 0. So, given a tuple of syzygies S of G, we can read the formula G S = 0 as the corresponding matrix expression.

On the other hand, given a matrix M of size r×t, we can speak about the P -submodule of P^{r} generated by the t vectors represented by the columns of M. Consequently, when we write Syz(M), we mean the module of syzygies of the vectors represented by the columns of M. For a tuple of syzygies S of M, the corresponding matrix expression is again M S = 0.

Finally, a map λ : P^{s} ⟶ P^{r} defined by sending e_{i} to the vector g_{i} for i = 1, …, s can be represented by the s-tuple G = (g_{1}, …, g_{s}) as well as by the matrix whose columns represent the vectors in G. And now it should be clear that this matrix can safely be called G again.

The upshot of this discussion is that we represent a linear map between free modules by the matrix whose columns are the images of the canonical basis vectors, that the generators of the syzygy module of a tuple of vectors are the columns of the syzygy matrix, and that the syzygy matrix is on the right-hand side of the corresponding matrix product.

3.1 Computation of Syzygy Modules

The greatest of these [things common to all living beings] happen to be four pairs (συζυγίαι, syzygíai) in number:

wakefulness and sleep, youth and old age, inhalation and exhalation, and life and death.

(Aristoteles)

As you undoubtedly remember, the main step in the theory of Gröbner bases was taken in Section 2.3 where we discussed syzygies. There we saw that finding the Gröbner basis of a submodule of P^{r} is equivalent to being able to lift syzygies. The module of syzygies of a polynomial ideal or module is one of the fundamental algebraic objects. Therefore its computation is one of the central problems in Computational Commutative Algebra.

Syzygies also played a central role in Buchberger’s Algorithm in Section 2.5. A key ingredient in the development of this algorithm was the lifting of syzygies of leading terms. Thus the following questions arise naturally. Given a tuple G = (g_{1}, …, g_{s}) of elements in P^{r}, how can one lift the syzygies of their leading terms explicitly? And how can one get a set of generators for the module Syz(G) from those liftings?

Our strategy for answering those questions is to proceed as follows. Let G = (g_{1}, …, g_{s}) be a tuple of non-zero vectors in P^{r} which generate a module M, and let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. First we define a suitable module term ordering on the monomodule of terms 𝕋^{n}⟨ε_{1}, …, ε_{s}⟩ of P^{s}, namely the ordering τ induced by (σ, G), and show that the elements σ_{ij} defined in Theorem 2.3.7 form a τ -Gröbner basis of the syzygy module of (LM_{σ}(g_{1}), …, LM_{σ}(g_{s})). Next we assume that G is a Gröbner basis of M with respect to σ and prove that the liftings s_{ij} of those elements constitute a τ -Gröbner basis of Syz(G).

The final step is to compute the syzygy module Syz(H) for any tuple H = (h_{1}, …, h_{t}) of vectors which generate M. This goal is achieved in Theorem 3.1.8 by using a clever combination of the Division Algorithm 1.6.4 and the Extended Buchberger Algorithm 2.5.11. As a consequence, we see how to obtain all explicit representations of an element of a module as a combination of a given set of generators (see Corollary 3.1.9). And as a final byproduct we show how one can extract an irredundant system of generators of a module from a given one (see Corollary 3.1.12).

As in the previous chapter, we let K be a field, P = K[x_{1}, …, x_{n}] a polynomial ring, M ⊆ P^{r} a non-zero P -submodule, and G = (g_{1}, …, g_{s}) a tuple of non-zero vectors which generate M. Furthermore, we let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, and we write LM_{σ}(g_{i}) = c_{i} t_{i}e_{γ_{i}} with c_{i} ∈ K, t_{i} ∈ 𝕋^{n}, and γ_{i} ∈ {1, …, r} for i = 1, …, s. If we denote the canonical basis of the P -module P^{s} by {ε_{1}, …, ε_{s}}, the s-tuple G corresponds to the surjective P -linear map λ : P^{s} ⟶ M given by λ(ε_{i}) = g_{i} for i = 1, …, s. Recall that the syzygy module Syz(G) is nothing but the kernel of λ.

Our first goal is to introduce a certain module term ordering on the set of terms of P^{s} such that the map λ is somehow “compatible” with the module term orderings on P^{s} and P^{r}.

Definition 3.1.1. On 𝕋^{n}⟨ε_{1}, …, ε_{s}⟩, we define a complete relation τ in the following way. Let tε_{i} and t′ε_{j} be two elements of 𝕋^{n}⟨ε_{1}, …, ε_{s}⟩, where t, t′ ∈ 𝕋^{n} and i, j ∈ {1, …, s}.

Then we let tε_{i} ≥_{τ} t′ε_{j} if we have LT_{σ}(tg_{i}) >_{σ} LT_{σ}(t′g_{j}), or if we have LT_{σ}(tg_{i}) = LT_{σ}(t′g_{j}) and i ≤ j. The relation τ is called the ordering induced by (σ, G) on 𝕋^{n}⟨ε_{1}, …, ε_{s}⟩.

Using Definition 2.3.4 and Proposition 2.3.5, we can rephrase the definition of τ by saying that tε_{i} ≥_{τ} t′ε_{j} if deg_{σ,G}(tε_{i}) >_{σ} deg_{σ,G}(t′ε_{j}), or if deg_{σ,G}(tε_{i}) = deg_{σ,G}(t′ε_{j}) and i ≤ j. Now we check that this relation is indeed a module term ordering.

Lemma 3.1.2. The relation τ defined above is a module term ordering on 𝕋^{n}⟨ε_{1}, …, ε_{s}⟩.

Proof. According to Definition 1.4.15 we have to check that τ is reflexive, antisymmetric, transitive, compatible with the monomodule structure, and that it defines a term ordering. All the proofs are straightforward; here we prove the transitivity. Let t, t′, t′′ ∈ 𝕋^{n} and i, j, k ∈ {1, …, s} such that we have tε_{i} ≥_{τ} t′ε_{j} ≥_{τ} t′′ε_{k}. From the definition of τ we get LT_{σ}(tg_{i}) ≥_{σ} LT_{σ}(t′g_{j}) ≥_{σ} LT_{σ}(t′′g_{k}). Furthermore, we either have LT_{σ}(tg_{i}) >_{σ} LT_{σ}(t′′g_{k}), or we have LT_{σ}(tg_{i}) = LT_{σ}(t′g_{j}) = LT_{σ}(t′′g_{k}) and i ≤ j ≤ k. Both times we end up with tε_{i} ≥_{τ} t′′ε_{k}. □

What is τ good for? If the vectors in G form a σ -Gröbner basis of M, we can try to compute Syz(G) via the following steps: from Theorem 2.3.7 we know an explicit system of generators of Syz(LM_{σ}(G)), by Condition D_{1}) those syzygies lift to syzygies of G, and by Proposition 2.3.11 those liftings generate the desired syzygy module. So the main task is to make the process of lifting more explicit.

Let us recall some notation from Chapter 2. For i, j ∈ {1, …, s}, we defined t_{ij} = \frac{lcm(t_{i},t_{j})}{t_{i}} and σ_{ij} = \frac{1}{c_{i}} t_{ij}ε_{i} − \frac{1}{c_{j}} t_{ji}ε_{j}. Furthermore, we define 𝔹 = {(i, j) | 1 ≤ i < j ≤ s, γ_{i} = γ_{j}}. Theorem 2.3.7 says that the set Σ = {σ_{ij} | (i, j) ∈ 𝔹} generates Syz(LM_{σ}(G)). The importance of τ derives from the remarkable property that Σ is actually a τ -Gröbner basis of Syz(LM_{σ}(G)), as our next proposition shows.

Proposition 3.1.3. Let G = (g_{1}, …, g_{s}) be a tuple of non-zero vectors which generate M. Then the set Σ = {σ_{ij} | (i, j) ∈ 𝔹} is a τ -Gröbner basis of Syz(LM_{σ}(G)).

Proof. If Syz(LM_{σ}(G)) = 0, then Σ = ∅ is a σ -Gröbner basis of this module. Now let z ∈ Syz(LM_{σ}(G)) \ {0}, and let z′ = LF_{σ,G}(z). We want to show that LT_{τ} (z) ∈ ⟨LT_{τ} (σ_{ij}) | (i, j) ∈ 𝔹⟩. The definition of τ implies that LT_{τ} (z) = LT_{τ} (z′). Thus we may assume that z is homogeneous with respect to the 𝕋^{n}⟨e_{1}, …, e_{r}⟩-grading on P^{s} defined in Proposition 2.3.3. This means that if we write z = ∑_{i=1}^{s} c′_{i}t′_{i}ε_{i} with c′_{i} ∈ K and t′_{i} ∈ 𝕋^{n}, then we have t′_{i} LT_{σ}(g_{i}) = t′_{j} LT_{σ}(g_{j}) for all 1 ≤ i < j ≤ s such that c′_{i}c′_{j} ≠ 0.

Next, let μ = min{i | c′_{i} ≠ 0}. Then z is in fact a syzygy in the module Syz(LM_{σ}(g_{μ}), …, LM_{σ}(g_{s})), and the definition of τ implies LT_{τ} (z) = t′_{μ}ε_{μ}. Using Theorem 2.3.7, we find that the set Σ_{μ} = {σ_{ij} ∈ Σ | μ ≤ i < j ≤ s} is a system of generators of the syzygy module Syz(LM_{σ}(g_{μ}), …, LM_{σ}(g_{s})). Therefore we have a representation z = ∑_{μ≤i<j≤s} a_{ij}σ_{ij}, where a_{ij} ∈ P. By looking at the coefficient of ε_{μ} in this representation, we see that t′_{μ} is in the ideal generated by the set {t_{μj} | μ < j ≤ s}. Thus t′_{μ} is a multiple of one of those terms, say of t_{μk}. Since LT_{τ} (σ_{μk}) = t_{μk}ε_{μ}, it follows that LT_{τ} (z) ∈ ⟨LT_{τ} (σ_{μj}) | μ < j ≤ s⟩. □

Based on this result, we can now make the process of lifting the syzygies σ_{ij} explicit and obtain at the same time that the set of liftings is in fact a τ -Gröbner basis of Syz(G).

Proposition 3.1.4. Let G = (g_{1}, …, g_{s}) be a tuple of non-zero vectors in P^{r} which form a σ -Gröbner basis of M.

a) For all (i, j) ∈ 𝔹, we have either σ_{ij} ∈ Syz(G), i.e. λ(σ_{ij}) = 0, or a representation λ(σ_{ij}) = ∑_{k=1}^{s} f_{ijk}g_{k} with f_{ijk} ∈ P and such that deg_{σ,G}(σ_{ij}) = max_{σ}{LT_{σ}(f_{ijk}g_{k}) | k ∈ {1, …, s}} >_{σ} LT_{σ}(λ(σ_{ij})).

Now we define s_{ij} = σ_{ij} if λ(σ_{ij}) = 0 and s_{ij} = σ_{ij} −∑_{k=1}^{s} f_{ijk}ε_{k} otherwise.

b) The set {s_{ij} | (i, j) ∈ 𝔹} is a τ -Gröbner basis of Syz(G). In particular, it is a system of generators of Syz(G).

c) Let 𝔹′ ⊆ 𝔹 be such that {σ_{ij} | (i, j) ∈ 𝔹′} generates Syz(LM_{σ}(G)). Then the set {s_{ij} | (i, j) ∈ 𝔹′} is a system of generators of Syz(G).

Proof. To prove a), we recall that σ_{ij} is a homogeneous element of P^{s} of σ -degree deg_{σ,G}(σ_{ij}) = lcm(t_{i}, t_{j})e_{γ_{i}} by Theorem 2.3.7.a. Therefore we get LF(σ_{ij}) = σ_{ij} ∈ Syz(LM_{σ}(G)). Consequently, if λ(σ_{ij}) ≠ 0, then LT_{σ}(λ(σ_{ij})) <_{σ} deg_{σ,G}(σ_{ij}) by Proposition 2.3.6.b, and the desired representation follows from Condition A_{2}) in Theorem 2.4.1.

Next we prove b). If Syz(G) = 0, then also Syz(LM_{σ}(G)) = 0 by Condition D_{1}) of Theorem 2.4.1, and we have 𝔹 = ∅. Thus we can assume that Syz(G) ≠ 0. From a) and the definition of τ we deduce that LT_{τ} (s_{ij}) = t_{ij}ε_{i}. Now we take any non-zero element z of Syz(G). We have to show that LT_{τ} (z) is a multiple of one of the terms in {LT_{τ} (s_{ij}) | (i, j) ∈ 𝔹}. The definition of τ yields LT_{τ} (z) = LT_{τ} (LF_{σ,G}(z)). By Proposition 2.3.6.d, we have LF_{σ,G}(z) ∈ Syz(LM_{σ}(G)). Hence Proposition 3.1.3 implies the claim.

The proof of c) follows from Proposition 2.3.11. □

As a straightforward consequence of the preceding proposition, we have the following algorithm for computing syzygy modules of Gröbner bases.

Corollary 3.1.5. (Computing Syzygy Modules of Gröbner Bases) Let G = (g_{1}, …, g_{s}) be a tuple of non-zero vectors in P^{r} which form a σ -Gröbner basis of M. Consider the following sequence of instructions.

1) Create a matrix M over P with s rows and initially zero columns. Then compute the set B = {(i, j) | 1 ≤ i < j ≤ s, γ_{i} = γ_{j}}.

2) If B = ∅, return the matrix M. Otherwise, choose a pair (i, j) ∈ B and delete it from B.

3) Form the vectors σ_{ij} = \frac{1}{c_{i}} t_{ij}ε_{i} − \frac{1}{c_{j}} t_{ji}ε_{j} and calculate S_{ij} = λ(σ_{ij}). If S_{ij} ≠ 0, use the Division Algorithm 1.6.4 to compute a representation S_{ij} = ∑_{k=1}^{s} f_{ijk}g_{k} such that LT_{σ}(f_{ijk}g_{k}) ≤_{σ} LT_{σ}(S_{ij}) for k = 1, …, s.

4) If S_{ij} = 0, append σ_{ij}, expanded into a column vector, to the matrix M, and if S_{ij} ≠ 0, append the column s_{ij} = σ_{ij} − ∑_{k=1}^{s} f_{ijk}ε_{k} to the matrix M. Then continue with step 2).

This is an algorithm which returns a matrix M over P whose columns represent a τ -Gröbner basis of Syz(G), and in particular a system of generators of Syz(G).

Remark 3.1.6. Using Proposition 3.1.4.c, we can modify the above algorithm in the following way. Suppose that for some reason we know a subset 𝔹′ ⊂ 𝔹 such that Σ′ = {σ_{ij} ∈ Σ | (i, j) ∈ 𝔹′} is a set of generators of Syz(LM_{σ}(G)). Then we may start with B = 𝔹′ in step 1), and we still get a system of generators of Syz(G).

Let us illustrate the course of this algorithm with an example.

Example 3.1.7. In the ring P = K[x_{1}, x_{2}, x_{3}, x_{4}], consider the polynomials g_{1} = x_{1}x_{4} −x_{2}x_{3} , g_{2} = x_{1}x_{3}^{2} −x_{2}^{2}x_{4} , g_{3} = x_{1}^{2}x_{3} −x_{2}^{3} , and g_{4} = x_{2}x_{4}^{2} −x_{3}^{3} . Let G = (g_{1}, g_{2}, g_{3}, g_{4}) ∈ P^{4} , and let I = (g_{1}, g_{2}, g_{3}, g_{4}) ⊆ P. In order to compute the syzygy module of G, we observe that {g_{1}, g_{2}, g_{3}, g_{4}} is a Gröbner basis of I with respect to σ = DegLex. According to the corollary, we calculate

S_{12} = x_{3}^{2}g_{1} − x_{4}g_{2} = x_{2}^{2}x_{4}^{2} − x_{2}x_{3}^{3} = x_{2}g_{4}
S_{13} = x_{1}x_{3}g_{1} − x_{4}g_{3} = −x_{1}x_{2}x_{3}^{2} + x_{2}^{3}x_{4} = −x_{2}g_{2}
S_{14} = x_{2}x_{4}g_{1} − x_{1}g_{4} = x_{1}x_{3}^{3} − x_{2}^{2}x_{3}x_{4} = x_{3}g_{2}
S_{23} = x_{1}g_{2} − x_{3}g_{3} = −x_{1}x_{2}^{2}x_{4} + x_{2}^{3}x_{3} = −x_{2}^{2}g_{1}
S_{24} = x_{2}x_{4}^{2}g_{2} − x_{1}x_{3}^{2}g_{4} = x_{1}x_{3}^{5} − x_{2}^{3}x_{4}^{3} = x_{3}^{3}g_{2} − x_{2}^{2}x_{4}g_{4}
S_{34} = x_{2}x_{4}^{2}g_{3} − x_{1}^{2}x_{3}g_{4} = x_{1}^{2}x_{3}^{4} − x_{2}^{4}x_{4}^{2} = x_{3}^{3}g_{3} − x_{2}^{3}g_{4}

Therefore the P -module Syz(G) is generated by the columns of the matrix

M = ( \begin{matrix}x_{3}^{2} & x_{1}x_{3} & x_{2}x_{4} & x_{2}^{2} & 0 & 0 \\ −x_{4} & x_{2} & −x_{3} & x_{1} & x_{2}x_{4}^{2} − x_{3}^{3} & 0 \\ 0 & −x_{4} & 0 & −x_{3} & 0 & x_{2}x_{4}^{2} − x_{3}^{3} \\ −x_{2} & 0 & −x_{1} & 0 & −x_{1}x_{3}^{2} + x_{2}^{2}x_{4} & −x_{1}^{2}x_{3} + x_{2}^{3} \end{matrix} )

In fact, the columns of M are a Gröbner basis of Syz(G) with respect to the ordering induced by (σ, G).

At this point we know how to compute a system of generators of the syzygy module of a Gröbner basis. Now we become more ambitious and want to be able to calculate the syzygy module of an arbitrary system of generators {h_{1}, …, h_{t}} of M, where we even allow zero vectors.

The key ingredients will be the following. Using the Extended Buchberger Algorithm 2.5.11, we can calculate a Gröbner basis {g_{1}, …, g_{s}} of M together with representations g_{j} = a_{1j}h_{1} + ⋯ + a_{tj}h_{t} for j = 1, …, s. Furthermore, after we have calculated this Gröbner basis, we can use the Division Algorithm 1.6.4 to find representations h_{j} = b_{1j}g_{1} + ⋯ + b_{sj}g_{s} for j = 1, …, t. Thus we can explicitly calculate the matrices A = (a_{ij}) and B = (b_{ij}) required by the following theorem.

But before, we remind the reader that a tuple of vectors can also be viewed as a matrix, namely the matrix whose columns consist of the coordinates of the vectors.

Theorem 3.1.8. (Computation of Syzygy Modules) Let {h_{1}, …, h_{t}} be a system of generators of a P-submodule M of P^{r}, let H = (h_{1}, …, h_{t}), let {g_{1}, …, g_{s}} be a σ -Gröbner basis of M, and let G be the tuple (g_{1}, …, g_{s}). Furthermore, suppose we are given a t × s-matrix A = (a_{ij}) and an s × t-matrix B = (b_{ij}) over P such that G = H A and H = G B. Finally, let M be a matrix whose columns generate Syz(G), and let I_{t} be the t × t identity matrix. Then the columns of the matrix N = (A M | I_{t} − A B) generate the module Syz(H).

Proof. From G = H A and H = G B we get

H N = (H A M | H − H A B) = (G M | H − G B) = (0 | H − H) = 0

Hence the columns of N are syzygies of H. Conversely, if a column vector v is a syzygy of H, we have G B · v = H · v = 0. Hence we have B · v ∈ Syz(G), and therefore this vector lies in the column space of M. From the identity v = A (B · v) + (I_{t} − A B) · v we may then conclude that v lies in the column space of N. □

Corollary 3.1.9. (Explicit Membership) With the same assumptions as in Theorem 3.1.8, let m = ∑_{i=1}^{s} f_{i}g_{i} ∈ M, where f_{i} ∈ P for i = 1, …, s, and let F be the matrix consisting of one column whose entries are f_{1}, …, f_{s}.

a) The equality m = H (A F) provides an explicit expression of m as a combination of the given generators h_{1}, …, h_{t} of M.

b) Let N = (A M | I_{t} − A B). Then every explicit expression of m as a combination of the given generators h_{1}, …, h_{t} of M is of the form m = H (A F + N P) for a suitable matrix P consisting of one column of polynomials.

Proof. To prove a), it suffices to combine the two equalities m = G F and G = H A. Now we prove b). If m = H Q with a t×1-matrix Q of polynomials, we deduce from a) that H Q − H (A F) = 0. Hence Q − A F is a syzygy of H. From Theorem 3.1.8 we deduce that Q − A F = N P for a suitable column matrix P. Now we combine m = H Q with Q = A F + N P and obtain the claim. □

Our next example shows how one can apply the previous theorem in practice. It also demonstrates that the system of generators of Syz(H) provided by the theorem is in general not minimal.

Example 3.1.10. In Example 2.5.7 we saw that {g_{1}, g_{2}, g_{3}} with g_{1} = x^{2} , g_{2} = xy + y^{2} , and g_{3} = y^{3} is a Gröbner basis of the ideal I = (g_{1}, g_{2}) in P = K[x, y] with respect to σ = Lex. We let G = (g_{1}, g_{2}, g_{3}), h_{1} = g_{1} , and h_{2} = g_{2} , and we want to compute the syzygy module of H = (h_{1}, h_{2}).

Using the Extended Buchberger Algorithm 2.5.11, we calculate the matrix A, and using the Division Algorithm 1.6.4, we calculate the matrix B. We find

A = ( \begin{matrix}1 & 0 & y \\ 0 & 1 & −x + y \end{matrix} )  and  B = ( \begin{matrix}1 & 0 \\ 0 & 1 \\ 0 & 0 \end{matrix} )

An application of Corollary 3.1.5 now yields the system of generators s_{12} = yε_{1} + (−x + y)ε_{2} − ε_{3} , s_{13} = y^{3}ε_{1} − x^{2}ε_{3} , and s_{23} = y^{2}ε_{2} + (−x − y)ε_{3} of the P -module Syz(G). Therefore we get

M = ( \begin{matrix}y & y^{3} & 0 \\ −x + y & 0 & y^{2} \\ −1 & −x^{2} & −x − y \end{matrix} )

and N = ( \begin{matrix}0 & −y(x^{2} − y^{2}) & −y(x + y) & 0 & 0 \\ 0 & x^{2}(x − y) & x^{2} & 0 & 0 \end{matrix} )

Even if we delete the zero columns in N, we still have no minimal system of generators of Syz(H), since the second column is a multiple of the third. Altogether, we find

Syz(H) = ⟨−y(x + y)ε_{1} + x^{2}ε_{2}⟩ ⊆ P^{2}

It is apparent that in the preceding example we actually could have done without using the Extended Buchberger Algorithm or the Division Algorithm, since the Gröbner basis {g_{1}, g_{2}, g_{3}} contained the system of generators {h_{1}, h_{2}} whose syzygy module we wanted to compute. This happens quite often if we start with an arbitrary system of generators of M and determine a Gröbner basis from it by using Buchberger’s Algorithm. So, let us study this case.

Corollary 3.1.11. Suppose that, in the situation of Theorem 3.1.8, the matrix A is of the form A = (I_{t} | C) with a t × (s − t)-matrix C over P. Let M be a matrix whose columns generate Syz(G). If we decompose it in the form M = (\frac{M′}{M′′}) with a matrix M′ having t rows and a matrix M′′ having s − t rows, then the syzygy module Syz(H) is generated by the columns of the matrix M′ + C · M′′.

Proof. By assumption, the matrix B is of the form B = (\frac{I_{t}}{0} ). Therefore we obtain I_{t} − A B = I_{t} − I_{t} = 0, and the right-hand part of the matrix N in the theorem contributes nothing to Syz(H). The left-hand part of N is given by A M = (I_{t} | C) · (\frac{M′}{M′′}) = M′ + C · M′′. □

As an application of Theorem 3.1.8, we have the following method to determine an irredundant system of generators of a P -submodule M ⊆ P^{r}, i.e. a system of generators such that no proper subset of it generates M. Notice that the second condition in the following corollary can be checked effectively using the Submodule Membership Test 2.4.10.a.

Corollary 3.1.12. Let {h_{1}, …, h_{t}} be a system of generators of a P -sub-module M ⊆ P^{r}, let H = (h_{1}, …, h_{t}), and let N be a matrix over P whose columns generate the P -module Syz(H). For every i ∈ {1, …, t}, the following conditions are equivalent.

a) We have h_{i} ∈ ⟨h_{1}, …, h_{i−1}, h_{i+1}, …, h_{t}⟩.

b) The ideal generated by the i^{th} row of N is the unit ideal of P. In particular, a repeated application of this equivalence allows us to find

an irredundant system of generators of M which is contained in {h_{1}, …, h_{t}}.

Proof. Both conditions are equivalent to the condition that there exists a column in the column space of N whose i^{th} entry is 1. □

Example 3.1.13. Let h_{1} = x^{2}y^{2} − 1, h_{2} = x^{4}y^{4} − 2x^{2}y^{2} + xyz^{2} − \frac{1}{2}z^{4} + \frac{1}{2} , h_{3} = xyz^{2} − \frac{1}{2}z^{4} − \frac{1}{2} , and h_{4} = xy − z^{2} be polynomials in ℚ[x, y, z], and let I be the ideal generated by {h_{1}, h_{2}, h_{3}, h_{4}}. Using the method described in the corollary, we try to shorten this system of generators. Since Syz(h_{1}, h_{2}, h_{3}, h_{4}) = ⟨(1, 0, −2, −xy + z^{2}), (0, 0, −2xy + 2z^{2}, 2xyz^{2} − z^{4} − 1), (x^{2}y^{2} − 1, −1, 1, 0)⟩, we can delete h_{1} from the system of generators of I. Since Syz(h_{2}, h_{3}, h_{4}) = ⟨(0, −2xy + 2z^{2}, 2xyz^{2} − z^{4} − 1), (1, −x^{2}y^{2} − \frac{1}{2}xyz^{2} − \frac{1}{2}z^{4} + 1, −x^{3}y^{3} + \frac{1}{4}z^{6} + \frac{3}{2}xy − \frac{3}{4}z^{2})⟩, we can then delete h_{2} . The remaining system of generators {h_{3}, h_{4}} of I is irredundant, because we can check that Syz(h_{3}, h_{4}) = ⟨(−2xy + 2z^{2}, 2xyz^{2} − z^{4} − 1)⟩.

This example also shows that we can shorten some systems of generators in different ways. For instance, we could have deleted h_{2} and then h_{3} in order to get the irredundant system of generators {h_{1}, h_{4}} of I.

Exercise 1. Let f_{1}, f_{2} ∈ P be two non-zero polynomials. Suppose that the module Syz(f_{1}, f_{2}) ⊆ P^{2} is generated by a single vector (g_{1}, g_{2}) ∈ P^{2}. Then show that f_{2} is a multiple of g_{1} , and that gcd(f_{1}, f_{2}) = f_{2}/g_{1} .

Exercise 2. Compute a set of generators of Syz(H) in Example 3.1.10, using the method described in Corollary 3.1.11.

Exercise 3. Let P = K[x, y, z], let σ be a term ordering on 𝕋^{3} , let g_{1} = yz, g_{2} = xz, g_{3} = xy, and let G = (g_{1}, g_{2}, g_{3}). Find a subset 𝔹′ ⊆ 𝔹 such that the corresponding set Σ′ = {σ_{ij} ∈ Σ | (i, j) ∈ 𝔹′} is a set of generators of Syz(LM_{σ}(G)), but {s_{ij} | (i, j) ∈ 𝔹′} is not a τ -Gröbner basis of Syz(G), where τ is the ordering induced by (σ, G).

Exercise 4. Let G = (g_{1}, …, g_{s}), where g_{i} ∈ P for i = 1, …, s. Prove that Syz(G) = (0) if and only if s = 1.

Exercise 5. Let G = (g_{1}, …, g_{s}), where g_{i} ∈ P for i = 1, …, s and g_{1} = 1. Describe an explicit set of generators of Syz(G) consisting of s − 1 elements.

Exercise 6. Let I be an ideal in P = K[x_{1}, …, x_{n}].

a) Assume that I is a principal ideal generated by a non-zero element f. Then show that every element of I has a unique representation as a multiple of f.

b) Assume that I = (f_{1}, …, f_{r}), where f_{i} ∈ P for i = 1, …, r and r > 1, and let f ∈ I. Then show that f can be represented in more than one way as a combination of f_{1}, …, f_{r}.

Exercise 7. Let {h_{1}, …, h_{t}} be a set of vectors in P^{r} which generates a module M ⊆ P^{r}, let m ∈ M, and let σ be a term ordering of type PosTo on 𝕋^{n}⟨ε_{1}, …, ε_{t+1}⟩. Explain how one can use the knowledge of a σ -Gröbner basis of the syzygy module Syz(m, h_{1}, …, h_{t}) to give an alternative method for computing explicit membership.

Tutorial 28: Splines

Suppose we have a closed interval [a, b] ⊆ ℝ, where a, b ∈ ℝ and a < b. For k ≥ 1, a tuple C = (c_{0}, …, c_{k}) ∈ ℝ^{k} such that a = c_{0} < c_{1} < ⋯ < c_{k} = b defines a decomposition of the interval [a, b] into subintervals. Furthermore, suppose that we are given numbers d_{0}, … d_{k} ∈ ℝ. A tuple of polynomials (s_{1}, …, s_{k}) ∈ ℝ[x]^{k} is called a C -spline with values (d_{0}, …, d_{k}) if we have s_{i}(c_{i−1}) = d_{i−1} and s_{i}(c_{i}) = d_{i} for i = 1, …, k. The set of all C -splines will be denoted by 𝕊(C). Notice that we did not fix the tuple (d_{0}, …, d_{k}) here, i.e. that 𝕊(C) contains the C -splines for all tuples (d_{0}, …, d_{k}). Our goal in this tutorial is to study the set of C -splines and to compute it effectively.

To each spline (s_{1}, …, s_{k}) ∈ 𝕊(C) we can associate the spline function s : [a, b] ⟶ ℝ given by s(t) = s_{i}(t) for t ∈ [c_{i−1}, c_{i}] and i = 1, …, k. A natural situation in which spline functions are useful occurs when we have a bounded function f : [a, b] ⟶ ℝ (which may be very complicated) for which we know finitely many values d_{i} = f(c_{i}) for i = 0, …, k. In this case we are looking for a spline function s : [a, b] ⟶ ℝ which approximates f well, i.e. for which the number ∥ f − s ∥_{∞}= sup_{t∈[a,b]}{|f(t) − s(t)|} is small.

a) The simplest cases of splines are single polynomials passing through the points (c_{0}, d_{0}), …, (c_{k}, d_{k}). For i = 0, …, k, we define ℓ_{i} = ∏_{j≠i} \frac{x−c_{j}}{c_{i}−c_{j}} .

Show that the Lagrange interpolation polynomial ℓ = ∑_{i=0}^{k} d_{i}ℓ_{i} has degree ≤ k and passes through the points (c_{0}, d_{0}), …, (c_{k}, d_{k}). Write a CoCoA function Lagrange(…) which takes the list of pairs (c_{i}, d_{i}) and computes the Lagrange interpolation polynomial.

b) Take the functions f : [0, 2π] ⟶ ℝ given by f(t) = sin(t) and g : [−2, 2] ⟶ ℝ given by g(t) = \frac{1}{1+25t^{2}} . In each case, divide the interval into k = 4 equal parts and compute the corresponding Lagrangean interpolation polynomial. Hint: First write a CoCoA function Sin(…) which uses the Taylor expansion to compute the value of sin(t) up to a certain number of decimal digits. Then write a CoCoA function Values(…) which takes the tuple (c_{0}, …, c_{k}) and the name of the function and computes the list of pairs [(c_{0}, d_{0}), …, (c_{k}, d_{k})]. Finally, this list can be used in Lagrange(…).

.^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}  ^{^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ................................................................................................................................................................................................................................................................................................................................................................................................................................................^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}}

c) Repeat part b) with k = 8. Use CoCoA to compute approximations for ∥ f − s ∥_{∞} and ∥ g − s ∥_{∞} in all cases. Conclude that the approximation of f by its interpolation polynomial got better when we increased k, whereas the approximation of g got worse. Hint: Compute |f(t)−s(t)| resp. |g(t)−s(t)| for all t increasing in steps of 0.01 from a to b.

.^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................  ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} .........................................................................................................................................................................................................................................................................................................................................................................................................................^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}

d) Let r ≥ 0, and let A_{r} be the matrix

( \begin{matrix}1 & −1 & 0 & ⋯ & 0 & (x − c_{1})^{r+1} & 0 & ⋯ & 0 \\ 0 & ... & ... & ... & ⋮ & 0 & ... & ... & ⋮ \\ ⋮ & ... & ... & ... & 0 & ⋮ & ... & ... & 0 \\ 0 & ⋯ & 0 & 1 & −1 & 0 & ⋯ & 0 & (x − c_{k−1})^{r+1} \end{matrix} )

of size (k − 1) × (2k − 1). Prove that, for a spline (s_{1}, …, s_{k}) ∈ 𝕊(C), the following conditions are equivalent.

1) The associated spline function s : [a, b] ⟶ ℝ is r times differentiable and its r^{th} derivative is continuous.

2) For i = 1, …, k−1, the difference s_{i}−s_{i+1} is divisible by (x−c_{i})^{r+1}.

3) There are polynomials s_{k+1}, …, s_{2k−1} ∈ ℝ[x] such that the tuple (s_{1}, …, s_{2k−1}) is contained in Syz(A_{r}).

The set of all C -splines (s_{1}, …, s_{k}) satisfying these conditions will be denoted by 𝕊^{r}(C).

e) Using d), conclude that 𝕊^{r}(C) is an ℝ[x]-submodule of ℝ[x]^{k}. Write a CoCoA function Splines(…) which takes r and a tuple C ∈ ℚ^{k+1} and computes a system of generators for the ℝ[x]-module 𝕊^{r}(C). Hint: Use Lemma 2.4.16 to show that it suffices to compute a system of generators of the corresponding ℚ[x]-module.

f) Let d ≥ 0. We say that a C -spline (s_{1}, …, s_{k}) ∈ 𝕊^{r}(C) has degree ≤ d if deg(s_{i}) ≤ d for i = 1, …, k. Prove that the subset 𝕊_{d}^{r}(C) ⊆ 𝕊^{r}(C) of all C -splines of degree ≤ d is an ℝ-vector subspace of ℝ[x]^{k} of dimension

dim_{ℝ}(𝕊_{d}^{r}(C)) = \{ \begin{matrix}d + 1 & if d < r + 1 \\ (k − 1)(d − r) + d + 1 & if d ≥ r + 1 \end{matrix}

Hint: Consider the vectors (x^{i}, …, x^{i}), where i = 0, …, d, and the vectors (0, …, 0, x^{i}(x−c_{j})^{r+1}, …, x^{i}(x−c_{j})^{r+1}), where i = 0, …, d−r −1 and j = 1, …, k − 1. (There are j zeros.)

158 3. First Applications

g) A C -spline (s_{1}, …, s_{k}) ∈ 𝕊_{3}^{2}(C) is called a natural C -spline if it satisfies the additional conditions s′′_{1}(a) = 0 and s′′_{k}(b) = 0. Let (s_{1}, …, s_{k}) be a natural C -spline with values (d_{0}, …, d_{k}).

1) Prove that the tuple (0, s′′_{1}(c_{1}), …, s′′_{k−1}(c_{k−1}), 0) is the unique solution of the system of equations

(c_{i}−c_{i−1})x_{i−1}+2 (c_{i+1}−c_{i−1})x_{i}+(c_{i+1}−c_{i})x_{i+1} = 6(\frac{d_{i+1}−d_{i}}{c_{i+1}−c_{i}} −\frac{d_{i}−d_{i−1}}{c_{i}−c_{i−1}} )

where i = 1, …, k − 1.

2) Show that the spline (s_{1}, …, s_{k}) can be computed from this tuple via the formulas s_{i} = α_{i}(x−c_{i−1})^{3}+β_{i}(x−c_{i−1})^{2}+γ_{i}(c−c_{i−1})+d_{i−1} , where α_{i} = \frac{1}{6(c_{i}−c_{i−1})} ·(s′′_{i}(c_{i})−s′′_{i−1}(c_{i−1})), where β_{i} = \frac{1}{2} s′′_{i−1}(c_{i−1}),

and where γ_{i} = \frac{c_{i−1}−c_{i}}{6} · (s′′_{i}(c_{i}) + 2s′′_{i−1}(c_{i−1})) + \frac{d_{i}−d_{i−1}}{c_{i}−c_{i−1}} for every i ∈ {1, …, k}.

3) Write a CoCoA function NatSpline(…) which takes the tuple of pairs ((c_{0}, d_{0}), …, (c_{k}, d_{k})) and computes the corresponding natural C -spline.

h) Apply your function NatSpline(…) to compute the natural C -spline approximating the function h : [0, 3] ⟶ ℝ given by h(t) = sin(e^{t}), where C is the equidistant decomposition of [0, 3] into 12 parts.

i) Redo part h) using the decomposition C′ = (0, 0.45, 1.15, 1.55, 1.85, 2.05, 2.25, 2.4, 2.55, 2.65, 2.75, 2.85, 3). Show that the corresponding spline function becomes a much better approximation of h.

.^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}• • • • • • • • • • • • • ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^{.}^{.}^{.}^{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}  ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}•  •  •  • • • • • •••• • ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}

Tutorial 29: Hilbert’s Syzygy Theorem

Let K be a field, let P = K[x_{1}, …, x_{n}], let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, let M ⊆ P^{r} be a P -submodule, and let G = (g_{1}, …, g_{s}) be a tuple of non-zero vectors which form a σ -Gröbner basis of M.

a) Suppose, in addition, that for every i = 1, …, s there exists an index γ_{i} ∈ {1, …, r} such that LT_{σ}(g_{i}) = e_{γ_{i}}. Show that the P -module M is free. (Hint: Reduce the proof to the case where γ_{i} ≠ γ_{j} for i ≠ j. Then argue as in Exercise 7 of Section 2.3.) Now assume instead that LT_{σ}(g_{1}) >_{PosLex} ⋯ >_{PosLex} LT_{σ}(g_{s}) and that

there exists a number m ∈ {1, …, n} such that LT_{σ}(g_{i}) ∈ K[x_{m}, …, x_{n}]^{r} for i = 1, …, s.

b) Prove that LT_{τ} (σ_{ij}) ∈ K[x_{m+1}, …, x_{n}]^{s} for all syzygies σ_{ij} of G constructed in Corollary 3.1.5, where τ is the ordering induced by (σ, G) on 𝕋^{n}⟨ε_{1}, …, ε_{s}⟩.

c) Conclude that, in the situation of b), there exists an exact sequence

0 ⟶ F_{n−m} ⟶ ⋯ ⟶ F_{1} ⟶ F_{0} ⟶ M ⟶ 0

with finitely generated free P -modules F_{0}, …, F_{n−m}.

d) Let N be a non-zero, finitely generated P -module. Represent the module N as N ≅ P^{r}/M for a suitable r ≥ 1 and a P -submodule M of P^{r}. Then use c) to show that there exists an exact sequence

0 ⟶ F_{n} ⟶ ⋯ ⟶ F_{1} ⟶ F_{0} ⟶ N ⟶ 0

with finitely generated free P -modules F_{0}, …, F_{n}, some of which may be zero. This is an effective proof of Hilbert’s Syzygy Theorem due to F. Schreyer.

e) Let n = 3. Write a CoCoA program HilbRes(…) which takes a tuple of non-zero vectors G which form a Gröbner basis of a module M and computes a resolution of the residue class module P^{r}/M in the way described above. (Do not use the built-in CoCoA function Res(…).)

3.2 Elementary Operations on Modules

‘And you do Addition?’ the White Queen asked. ‘What’s one and one and one and one and one and one and one and one and one and one?’ ‘I don’t know,’ said Alice. ‘I lost count.’

‘She can’t do Addition,’ the Red Queen interrupted. ‘Can you do Subtraction? Take nine from eight.’

‘Nine from eight I can’t, you know,’ Alice replied very readily: ‘but – ’ ‘She can’t do Subtraction,’ said the White Queen. ‘Can you do Division?

Divide a loaf by a knife – what’s the answer to that?’

‘I suppose –’ Alice was beginning, but the Red Queen answered for her.

‘Bread-and-butter, of course’. (Charles L. Dodgson)

This is rather a long section, much longer than the average. Even the quotation is longer than usual! Why? As the title suggests, we want to describe techniques for computing elementary operations on modules such as sums, products, intersections, colon ideals, annihilators, etc. The key ingredient will be the computation of syzygy modules explained in the previous section. Then, in later sections and in Volume 2, our elementary operations on modules will themselves become the key ingredients for a host of other applications of Computational Commutative Algebra.

It is a fact that there are many different ways to perform these operations, and our goal is to describe the most important ones in sufficient detail so that the propositions we present can be easily translated into algorithms. We are aware that the general appearance of the entire section is rather technical, with many matrices and indices floating around. However, if you are interested both in the theoretical background and in how to implement the operations described here, then we hope that you are ready to pay this price.

Now let us have a closer look at the contents of the current section. We decided to split it into three subsections which deal with intersections, colon ideals and annihilators, and colon modules, respectively.

Do we do Addition? Not really, because we consider it trivial. Can we do Subtraction? Nor that. We don’t know what the difference of two ideals or modules could mean. The first non-obvious operation is the computation of the intersection of two ideals or submodules. First, consider the following simple case. For two non-zero principal ideals I = (f) and J = (g) in P = K[x] we saw in Proposition 1.2.8.a that their intersection is I ∩ J = (lcm(f, g)).

What happens if we consider ideals I and J in P = K[x_{1}, …, x_{n}]? How can we compute a set of generators of I ∩J from given sets of generators of I and J? There is no obvious answer, but in Section 3.1 we expended a lot of effort to compute syzygies, and now it is time to reap the rewards. With the tools developed there we will be able to solve the problem even in the more general case of modules (see Propositions 3.2.3 and 3.2.7).

A nice consequence is the possibility of presenting a module of the form M/(M ∩ N) via generators and relations (see Corollary 3.2.6). Another nice extra bonus is the discovery that syzygies provide a method for computing greatest common divisors and least common multiples of multivariate polynomials, without having to resort to factorizing algorithms (see Corollary 3.2.9).

Can we do Division? Suppose we are given two non-zero polynomials g, h ∈ P such that g = fh for some polynomial f ∈ P. This equation implies that f is a generator of the ideal {a ∈ P | a·h ∈ (g)}. For two ideals I, J ⊆ P, a natural generalization is to consider the ideal I :_{P} J = {a ∈ P | a · J ⊆ I}. We call it the colon ideal of I by J. This construction is particularly useful in the computation of the so-called primary decompositions (see Tutorial 43) and in algebraic geometry, where it is related to the process of removing irreducible components from an algebraic variety.

The definition of colon ideals can be extended in two ways into the realm of modules. One method describes an operation on two modules which produces an ideal, called the colon ideal. It can also be viewed as the annihilator of a certain quotient module (see Definition 3.2.10). The other method yields an operation on two modules and an ideal which produces a module called the colon module (see Definition 3.2.17).

In the subsection “Colon Ideals and Annihilators” we show two different approaches to the computation of colon ideals, one based on intersections and the other based on syzygies of a suitable matrix (see Proposition 3.2.15). And in the subsection “Colon Modules” we show two different approaches to the computation of colon modules. Again, one is based on intersections and the other on syzygies of a suitable matrix (see Proposition 3.2.22). A final application of the techniques developed above is a method for checking whether a given sequence of polynomials is a regular sequence, a property which we shall reexamine in Tutorial 33 and in Volume 2.

Let K be a field, n ≥ 1, P = K[x_{1}, …, x_{n}] a polynomial ring, r ≥ 1, σ a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, and G = (g_{1}, …, g_{s}) ∈ (P^{r})^{s} a tuple of vectors which generate a P -submodule M of P^{r}. Furthermore, we let H = (h_{1}, …, h_{t}) ∈ (P^{r})^{t} be a tuple of vectors which generate another P -submodule N of P^{r}.

For an r′ ×s′ matrix M with entries in P, we let Syz(M) be the syzygy module of the tuple of the columns of M, each viewed as a vector in P^{r′}, as already explained in the introduction of the chapter. The following remark collects some operations on modules which can be computed in a completely trivial way.

Remark 3.2.1. Let M = ⟨g_{1}, …, g_{s}⟩ and N = ⟨h_{1}, …, h_{t}⟩ be two P -sub-modules of P^{r} as above, and let I ⊆ P be an ideal which is generated by a set of polynomials {f_{1}, …, f_{u}} ⊆ P.

a) The sum M + N is the P -submodule of P^{r} generated by the set of vectors {g_{1}, …, g_{s}, h_{1}, …, h_{t}} ⊆ P^{r}. b) The product I · M is the P -submodule of P^{r} generated by the set of

vectors {f_{i}g_{j} | 1 ≤ i ≤ u, 1 ≤ j ≤ s} ⊆ P^{r}.

c) For every d ≥ 1, the power I^{d} is the ideal of P generated by the set of polynomials {f_{j_{1}} ⋯ f_{j_{d}} | j_{1}, …, j_{d} ∈ {1, …, u}} ⊆ P.

3.2.A Intersections

The first non-trivial operation we consider is the computation of the intersection of two submodules of P^{r}. One method for performing this computation is based on the following result about the preimage of a submodule of P^{r} under a P -linear map λ : P^{s} ⟶ P^{r}. Recall that the canonical basis of P^{s} is denoted by {ε_{1}, …, ε_{s}}.

Lemma 3.2.2. Let N = ⟨h_{1}, …, h_{t}⟩ be a P -submodule of P^{r}, and let the P -linear map λ : P^{s} ⟶ P^{r} be given by φ(ε_{i}) = g_{i} for i = 1, …, s. We let {v_{1}, …, v_{u}} ⊆ P^{s+t} be a system of generators of Syz(g_{1}, …, g_{s}, h_{1}, …, h_{t}), and we write v_{j} = (f_{1j}, …, f_{s+t j}) with f_{1j}, …, f_{s+t j} ∈ P for j = 1, …, u. Then we have

λ^{−1}(N) = ⟨(f_{1j}, …, f_{sj}) | 1 ≤ j ≤ u⟩

Proof. Since we have λ(f_{1j}, …, f_{sj}) = ∑_{i=1}^{s} f_{ij}g_{i} = − ∑_{i=1}^{t} f_{s+i j}h_{i} ∈ N for j = 1, …, u, it suffices to prove the reverse inclusion. Given a vector v = (a_{1}, …, a_{s}) ∈ λ^{−1}(N), we can find polynomials a_{s+1}, …, a_{s+t} ∈ P such that λ(v) = ∑_{i=1}^{s} a_{i}g_{i} = − ∑_{i=1}^{t} a_{s+i}h_{i}. Then (a_{1}, …, a_{s+t}) is in Syz(g_{1}, …, g_{s}, h_{1}, …, h_{t}), and we can find polynomials p_{1}, …, p_{u} ∈ P such that (a_{1}, …, a_{s+t}) = ∑_{j=1}^{u} p_{j}v_{j}. In particular, we get v = (a_{1}, …, a_{s}) = ∑_{j=1}^{u} p_{j}(f_{1j}, …, f_{sj}) which proves the claim. □

Proposition 3.2.3. (Intersection of Two Submodules) Let M = ⟨g_{1}, …, g_{s}⟩ and N = ⟨h_{1}, …, h_{t}⟩ be two P -submodules of P^{r}, and let λ : P^{s} ⟶ P^{r} be the P -linear map given by φ(ε_{i}) = g_{i} for i = 1, …, s.

a) Let {v_{1}, …, v_{u}} ⊆ P^{s+t} be a system of generators of the P -module Syz(g_{1}, …, g_{s}, h_{1}, …, h_{t}), and let v_{j} = (f_{1j}, …, f_{s+t j}) with polynomials f_{1j}, …, f_{s+t j} ∈ P for j = 1, …, u. Then we have

M ∩ N = λ(λ^{−1}(N)) = ⟨∑_{i=1}^{s}f_{ij}g_{i} | 1 ≤ j ≤ u⟩

b) Consider the following block matrix of size 2r × (r + s + t)

M = ( \begin{matrix}I_{r} & G & 0 \\ I_{r} & 0 & H \end{matrix} )

where I_{r} is the r × r identity matrix. Let {v_{1}, …, v_{u}} ⊆ P^{r+s+t} be a system of generators of Syz(M), and let v_{j} = (f_{1j}, …, f_{r+s+t j}) with f_{1j}, …, f_{r+s+t j} ∈ P for j = 1, …, u. Then

M ∩ N = ⟨(f_{1j}, …, f_{rj}) | 1 ≤ j ≤ u⟩ Proof. Since claim a) follows immediately from the lemma, it suffices to show claim b). Let w_{1}, …, w_{r+s+t} be the column vectors of M. If we look at the first and the last r components of f_{1j}w_{1} + ⋯ + f_{r+s+t j} w_{r+s+t} = 0, we obtain

( f_{1j} ; ⋮ ; f_{rj} ) = −f_{r+1 j} g_{1} − ⋯ − f_{r+s j} g_{s} = −f_{r+s+1 j} h_{1} − ⋯ − f_{r+s+t j} h_{t}

for j = 1, …, u, and therefore (f_{1j}, …, f_{rj}) ∈ M ∩N. Conversely, if we start with an element v ∈ M∩N, and if we write v = (a_{1}, …, a_{r}) with polynomials a_{1}, …, a_{r} ∈ P, then there are polynomials a_{r+1}, …, a_{r+s+t} ∈ P such that

v = −a_{r+1}g_{1} − ⋯ − a_{r+s}g_{s} = −a_{r+s+1}h_{1} − ⋯ − a_{r+s+t}h_{t}

By combining those representations of v, we get the vector equation

a_{1}w_{1} + ⋯ + a_{r+s+t}w_{r+s+t} = 0

Thus there are polynomials p_{1}, …, p_{u} ∈ P such that

(a_{1}, …, a_{r+s+t}) = ∑_{j=1}^{u} p_{j}(f_{1j}, …, f_{r+s+t j})

The first r components of this equality now prove the claim. □

Example 3.2.4. Let us compute the intersection of the ideals I_{1} = (x_{1}, x_{2}) and I_{2} = (x_{1}^{2} − x_{2}^{2}, x_{1}x_{2}x_{3}, x_{3}^{2} − x_{1}) in the ring K[x_{1}, x_{2}, x_{3}] using the two methods provided by this proposition.

Following the first method, we compute a system of generators of the syzygy module Syz(x_{1}, x_{2}, x_{1}^{2}−x_{2}^{2}, x_{1}x_{2}x_{3}, x_{3}^{2}−x_{1}) and get {v_{1}, v_{2}, v_{3}, v_{4}, v_{5}}, where v_{1} = (x_{2}, −x_{1}, 0, 0, 0), v_{2} = (x_{1}, −x_{2}, −1, 0, 0), v_{3} = (−x_{2}, x_{3}^{2}, 0, 0, −y), v_{4} = (x_{3}^{2} − x_{1}, 0, 0, 0, −x_{1}), and v_{5} = (x_{2}x_{3}, 0, 0, −1, 0). Therefore we conclude that I_{1} ∩ I_{2} = (x_{1}^{2} − x_{2}^{2}, x_{2}x_{3}^{2} − x_{1}x_{2}, x_{1}x_{3}^{2} − x_{2}^{2}, x_{1}x_{2}x_{3}).

Following the second method, we compute a system of generators of the syzygy module of the columns of

M = ( \begin{matrix}1 & x_{1} & x_{2} & 0 & 0 & 0 \\ 1 & 0 & 0 & x_{1}^{2} − x_{2}^{2} & x_{1}x_{2}x_{3} & x_{3}^{2} − x_{1} \end{matrix} )

The computation yields the set {⟨0, x_{2}, −x_{1}, 0, 0, 0⟩, ⟨−x_{1}^{2}+x_{2}^{2}, x_{1}, −x_{2}, 1, 0, 0⟩, ⟨−x_{2}x_{3}^{2}+x_{1}x_{2}, 0, x_{3}^{2}−x_{1}, 0, 0, x_{2}⟩, ⟨−x_{1}x_{3}^{2}+x_{2}^{2}, x_{3}^{2}, −x_{2}, 1, 0, x_{1}⟩, ⟨−x_{1}x_{2}x_{3}, 0, x_{1}x_{3}, 0, 1, 0⟩}. We pick the first non-zero coordinates of these vectors and get I_{1} ∩ I_{2} = (−x_{1}^{2} + x_{2}^{2}, −x_{2}x_{3}^{2} + x_{1}x_{2}, −x_{1}x_{3}^{2} + x_{2}^{2}, −x_{1}x_{2}x_{3}), in agreement with the above result.

Next we use the preceding proposition to solve an important problem. Before, let us introduce a little bit of terminology.

Definition 3.2.5. Let R be a ring, and let M = ⟨m_{1}, …, m_{s}⟩ be a finitely generated R-module. Suppose that the syzygy module Syz(m_{1}, …, m_{s}) has a finite system of generators {v_{1}, …, v_{u}} ⊆ R^{s}. Moreover, let {e_{1}, …, e_{s}} be the canonical basis of R^{s} and {ε_{1}, …, ε_{u}} the canonical basis of R^{u}.

We define an R-linear map φ : R^{s} ⟶ M by φ(e_{i}) = m_{i} for i = 1, …, s and an R-linear map ψ : R^{u} ⟶ R^{s} by ψ(ε_{j}) = v_{j} for j = 1, …, u. Then the sequence

R^{u} ⟶^{ψ} R^{s} ⟶^{φ} M ⟶ 0

is clearly exact. It is called a presentation of M via generators and relations, or simply a presentation of M. Equivalently, we shall also call the induced isomorphism M ≅ R^{s}/⟨v_{1}, …, v_{u}⟩ a presentation of M. Here the residue classes of the canonical basis vectors of R^{s} correspond to the generators of M, and the vectors v_{1}, …, v_{u} generate the module of relations among those generators.

Given two submodules M, N of P^{r}, it is natural to ask for a presentation of M/(M ∩ N) via generators and relations. More generally, we have the following result.

Corollary 3.2.6. Given the situation of Proposition 3.2.3, we define vectors w_{j} = (f_{1j}, …, f_{sj}) for j = 1, …, u. The map λ induces a P -linear map \overline{λ} : P^{s} ⟶ M/(M ∩ N). Moreover, let ψ : P^{u} ⟶ P^{s} be the P -linear map which sends ε_{j} to w_{j} for j = 1, …, u. Then the sequence

P^{u} ⟶^{ψ} P^{s} ⟶^{\overline{λ}} M/(M ∩ N) ⟶ 0

is a presentation of M/(M ∩ N). In other words, there is an isomorphism of P -modules M/(M ∩ N) ≅ P^{s}/⟨w_{1}, …, w_{u}⟩.

Proof. Since the image of λ is M, it is clear that \overline{λ} is surjective. The kernel of \overline{λ} is λ^{−1}(M ∩N) = λ^{−1}(N). By Lemma 3.2.2, this preimage equals ⟨w_{1}, …, w_{u}⟩ = Im(ψ). □

If we need to compute the intersection of a finite number of submodules M_{1}, …, M_{ℓ} of P^{r}, we may either proceed recursively or try to intersect all submodules simultaneously.

Proposition 3.2.7. (Computation of Multiple Intersections) Let ℓ ≥ 2, and let M_{1}, …, M_{ℓ} ⊆ P^{r} be P -submodules. For every index i ∈ {1, …, ℓ}, let M_{i} be a matrix whose column vectors generate M_{i}.

a) We have M_{1} ∩ ⋯ ∩ M_{ℓ} = (⋯ ((M_{1} ∩ M_{2}) ∩ M_{3}) ∩ ⋯) ∩ M_{ℓ}. Therefore we can compute M_{1} ∩ ⋯ ∩ M_{ℓ} by iteratively applying Proposition 3.2.3.

b) Consider the block matrix

M = ( \begin{matrix}I_{r} & M_{1} & 0 & ⋯ & 0 \\ I_{r} & 0 & M_{2} & ... & ⋮ \\ ⋮ & ⋮ & ... & ... & 0 \\ I_{r} & 0 & ⋯ & 0 & M_{ℓ} \end{matrix} )

Let {v_{1}, …, v_{u}} be a system of generators of the syzygy module Syz(M), and write v_{j} = (f_{1j}, f_{2j}, …) with f_{1j}, f_{2j}, … ∈ P for j = 1, …, u. Then we have

M_{1} ∩ ⋯ ∩ M_{ℓ} = ⟨(f_{1j}, …, f_{rj}) | 1 ≤ j ≤ u⟩

Proof. The proof of the second method follows in the same way as the proof of Proposition 3.2.3.b. □

Example 3.2.8. Let us compute the intersection of the three prime ideals 𝔭_{1} = (x, y), 𝔭_{2} = (x^{2} − y^{3}, y^{2} − z), and 𝔭_{3} = (x − y^{3}, y^{2} − z) in K[x, y, z] using the two methods explained in this proposition.

First, we compute I = 𝔭_{1} ∩ 𝔭_{2} and get I = (y^{3} − yz, xy^{2} − xz, x^{2} − yz). Then we calculate I ∩ 𝔭_{3} and get 𝔭_{1} ∩ 𝔭_{2} ∩ 𝔭_{3} = (y^{3} − yz, xy^{2} − xz, x^{2}yz − y^{2}z^{2} − x^{3} + xyz).

Following the second method, we compute a system of generators of the syzygy module of the columns of

M = ( \begin{matrix}1 & x & y & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & x^{2} − y^{3} & y^{2} − z & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & x − y^{3} & y^{2} − z \end{matrix} )

The computation yields a complicated set of generators, from which we extract the first coordinates and get 𝔭_{1}∩𝔭_{2}∩𝔭_{3} = (−y^{3}+yz, −xy^{2}+xz, −x^{2}yz+ y^{2}z^{2}+x^{3}−xyz, −x^{2}y^{2}+y^{3}z+x^{2}z−yz^{2}, −x^{3}y+xy^{2}z+x^{2}z^{2}−yz^{3}). An irredundant subset of generators is {−y^{3} +yz, −xy^{2} +xz, −x^{2}yz +y^{2}z^{2} +x^{3} −xyz}. Thus we see that we get the same ideal as above.

As an application of the preceding two propositions, we can show how to compute greatest common divisors and least common multiples of polynomials in n indeterminates. We point out that the following corollary provides an algorithm which works over any base field K over which we can compute Gröbner bases. In particular, it does not require factorization of multivariate polynomials.

As in Section 1.2, the expressions gcd(f_{1}, …, f_{m}) resp. lcm(f_{1}, …, f_{m}) shall represent any greatest common divisor resp. least common multiple of a set of polynomials {f_{1}, …, f_{m}} ⊆ P.

Corollary 3.2.9. (Computation of gcd and lcm) Let m ≥ 2, let f_{1}, …, f_{m} ∈ P, and let σ be a term ordering on 𝕋^{n}.

a) The reduced σ -Gröbner basis of the intersection ideal (f_{1}) ∩ ⋯ ∩ (f_{m}) consists of precisely one element, namely the element lcm(f_{1}, …, f_{m}). Thus least common multiples can be computed using Proposition 3.2.7. b) A greatest common divisor of two polynomials can be computed via a) and

the formula gcd(f_{1}, f_{2}) = f_{1}f_{2}/ lcm(f_{1}, f_{2}). A greatest common divisor of more than two polynomials can be computed recursively using the formula gcd(f_{1}, …, f_{m}) = gcd(gcd(f_{1}, …, f_{m−1}), f_{m}).

Proof. By Proposition 1.2.8.a, the ideal I = (f_{1}) ∩ ⋯ ∩ (f_{m}) is generated by the polynomial f = lcm(f_{1}, …, f_{m}). Since I is a principal ideal, we have LT_{σ}(I) = (LT_{σ}(f)), and therefore the reduced σ -Gröbner basis of I consists of precisely one polynomial, namely f. This proves a), and b) is an immediate consequence of a) and Proposition 1.2.8.b. □

3.2.B Colon Ideals and Annihilators

Now we start to consider the problem of computing colon ideals and annihilators. They are defined as follows.

Definition 3.2.10. Let R be a ring, and let U be an R-module.

a) Given two R-submodules M and N of U, the set

N :_{R} M = {r ∈ R | r · M ⊆ N}

is an ideal of R. It is called the colon ideal (or the ideal quotient if U = R) of N by M.

b) Let M be an R-module. The set Ann_{R}(M) = {r ∈ R | r · M = 0} is an ideal of R. It is called the annihilator of M.

Colon ideals and annihilators are essentially the same thing, as our next proposition shows.

Proposition 3.2.11. Let R be a ring, let U be an R-module, and let M and N be two R-submodules of U. Then

N :_{R} M = Ann_{R}(M/(N ∩ M))

Proof. The definition yields Ann_{R}(M/(N ∩M)) = {r ∈ R | r·M ⊆ N ∩M}. Since r ·M is contained in M for every r ∈ R, we get Ann_{R}(M/(N ∩M)) = {r ∈ R | r · M ⊆ N}, and this proves the claim. □

Our goal is to compute the above objects effectively when we deal with finitely generated modules over affine algebras. We just saw that computing colon ideals is the same thing as computing annihilators. The next remark says that for our purposes it suffices to compute annihilators of finitely generated P -modules, where P = K[x_{1}, …, x_{n}] is the polynomial ring over a field K as usual.

Remark 3.2.12. Let J be an ideal in P, let M be a finitely generated module over the affine K -algebra P/J, and let π : P −↠ P/J be the canonical homomorphism. We can view M as a finitely generated P -module via π, i.e. via f · m = π(f)m for f ∈ P and m ∈ M.

Then the annihilator Ann_{P/J}(M) is the image of the ideal Ann_{P} (M) under π, because π(f) ∈ Ann_{P/J}(M) for some f ∈ P means π(f) · M = f · M = 0, i.e. it means f ∈ Ann_{P} (M).

The following lemma solves our problem in the case of a cyclic module M.

Lemma 3.2.13. Let M = ⟨g⟩ and N = ⟨h_{1}, …, h_{t}⟩ be two P -submodules of P^{r}, where M is cyclic. Let {v_{1}, …, v_{u}} ⊆ P^{t+1} be a system of generators of Syz(g, h_{1}, …, h_{t}). We write v_{j} = (f_{1j}, …, f_{t+1 j}) with f_{1j}, …, f_{t+1 j} ∈ P for j = 1, …, u. Then

N :_{P} ⟨g⟩ = Ann_{P} (M/(N ∩ M)) = (f_{11}, …, f_{1u})

Proof. It suffices to apply Lemma 3.2.2 to the map λ : P ⟶ P^{r} given by 1 ↦ g, because we have N :_{P} ⟨g⟩ = λ^{−1}(N). □

Example 3.2.14. Consider the intersection I = 𝔭_{1} ∩ 𝔭_{2} of the two prime ideals 𝔭_{1} = (y, z) and 𝔭_{2} = (x − y^{2}, y^{3} − z) in the ring P = K[x, y, z]. Using Proposition 3.2.3, we find I = (xy−z, y^{3}−z). In fact, Corollary 3.1.12 allows us to check that {xy − z, y^{3} − z} is an irredundant system of generators of I.

Now we want to compute the colon ideal I :_{P} (f), where f is the polynomial f = x − y^{2} . The lemma tell us that we have to calculate Syz(x−y^{2}, xy−z, y^{3}−z). The result is the module generated by the two vectors (−y, 1, 1) and (z−xy, x−y^{2}, 0). Thus we obtain I :_{P} (f) = (−y, z−xy) = (y, z) = 𝔭_{1} .

The explanation of this result is simple, and we can prove it directly. For g ∈ 𝔭_{1} , we have fg ∈ 𝔭_{1} , and also fg ∈ 𝔭_{2} , since f ∈ 𝔭_{2} . Therefore we have fg ∈ I, and this means that g ∈ I :_{P} (f). Conversely, let fg ∈ I. Then fg ∈ 𝔭_{1} and f ∉ 𝔭_{1} implies g ∈ 𝔭_{1} , because 𝔭_{1} is a prime ideal.

Proposition 3.2.15. (Computation of Colon Ideals) Let M = ⟨g_{1}, …, g_{s}⟩ and N = ⟨h_{1}, …, h_{t}⟩ be two P -submodules of P^{r}, and let H = (h_{1}, …, h_{t}).

a) The colon ideal N :_{P} M and the annihilator of M/(N ∩ M) can be computed using Lemma 3.2.13 and the formula

N :_{P} M = Ann_{P} (M/(N ∩ M)) = ⋂_{i=1}^{s} (N :_{P} ⟨g_{i}⟩)

b) Consider the following block matrix of size rs × (st + 1)

M = ( \begin{matrix}g_{1} & H & 0 & ⋯ & 0 \\ g_{2} & 0 & H & ... & ⋮ \\ ⋮ & ⋮ & ... & ... & 0 \\ g_{s} & 0 & ⋯ & 0 & H \end{matrix} )

Let {v_{1}, …, v_{u}} ⊆ P^{st+1} be a system of generators of the syzygy module Syz(M). We write v_{j} = (f_{0j}, f_{1j}^{(1)}, … f_{tj}^{(1)}, . . . . . . , f_{1j}^{(s)}, …, f_{tj}^{(s)}) with

f_{0j}, f_{1j}^{(1)}, …, f_{tj}^{(s)} ∈ P for j = 1, …, u. Then we have
N :_{P} M = Ann_{P} (M/(N ∩ M)) = (f_{01}, …, f_{0u})

Proof. Part a) follows directly from the definitions. Therefore we prove claim b). Let w_{0}, w_{1}^{(1)}, …, w_{t}^{(1)}, . . . . . . , w_{1}^{(s)}, …, w_{t}^{(s)} ∈ P^{rs} be the column vectors of M. For j = 1, …, u we have f_{0j}w_{0} = − ∑_{k=1}^{s}(∑_{i=1}^{t} f_{ij}^{(k)}w_{i}^{(k)}). For a fixed ℓ ∈ {1, …, s}, we get f_{0j}g_{ℓ} = − ∑_{i=1}^{t} f_{ij}^{(ℓ)}h_{i} for j = 1, …, u. Since this holds for every ℓ between 1 and s, we get f_{0j} ∈ N :_{P} M for j = 1, …, u.

Conversely, let a_{0} ∈ N :_{P} M be given. Then there are polynomials a_{11}, …, a_{st} ∈ P such that a_{0}g_{j} = ∑_{i=1}^{t} a_{ij}h_{i} for j = 1, …, s. By combining these equations into a vector equation, we get

a_{0}w_{0} − (a_{11}w_{1}^{(1)} + ⋯ + a_{t1}w_{t}^{(1)} + · · · · · · + a_{1s}w_{1}^{(s)} + ⋯ + a_{ts}w_{t}^{(s)}) = 0

Therefore there exist polynomials p_{1}, …, p_{u} ∈ P such that the column vector given by (a_{0}, −a_{11}, …, −a_{t1}, . . . . . . , −a_{1s}, …, −a_{ts})^{tr} is equal to ∑_{j=1}^{u} p_{j}v_{j}. By considering the first component of this equation, we get a_{0} = ∑_{j=1}^{u} p_{j}f_{0j}, and this completes the proof. □

Example 3.2.16. Let I ⊆ ℚ[x_{1}, x_{2}, x_{3}] be the ideal which is given by the intersection of the three prime ideals 𝔭_{1} = (x_{1}, x_{2}), 𝔭_{2} = (x_{1}^{2} − x_{2}^{3}, x_{2} − x_{3}), and 𝔭_{3} = (x_{1} − x_{2}^{2}, x_{1}^{2} − x_{3}), and let J = (x_{2} − x_{3}, x_{1}^{2} − x_{3}).

If we want to compute I :_{P} J using part a) of the proposition, we have to calculate I_{1} = I :_{P} (x_{2} − x_{3}) via Lemma 3.2.13. The result is the ideal I_{1} = (x_{2}^{2} − x_{1}, x_{1}^{2}x_{2} − x_{2}x_{3}, x_{1}^{3} − x_{1}x_{3}). Similarly, we compute the ideal I_{2} = I :_{P} (x_{1}^{2} − x_{3}) = (x_{2}^{2} − x_{2}x_{3}, x_{1}^{2} − x_{2}x_{3}, x_{1}x_{2} − x_{1}x_{3}). Finally, we intersect I_{1} and I_{2} and get I :_{P} J = I_{1} ∩ I_{2} = I.

Again the result can be explained in the following way. We can prove as in Example 3.2.14 that I :_{P} (x_{2}−x_{3}) = 𝔭_{1}∩𝔭_{3} , and that I :_{P} (x_{1}^{2}−x_{3}) = 𝔭_{1}∩𝔭_{2} . Now the conclusion follows from part a) of the proposition again.

3.2.C Colon Modules

Given two ideals I and J in a ring R, we have seen how to compute the colon ideal I :_{R} J. The colon ideal of one R-module by another was a generalization of this colon ideal operation between ideals. But there is another way to generalize it from ideals to modules, namely the colon module operation.

Definition 3.2.17. Let R be a ring, let I be an ideal in R, let U be an R-module, and let M and N be two R-submodules of U. Then the set N :_{M} I = {m ∈ M | I · m ⊆ N} is an R-submodule of M (and of U). It is called the colon module of N by I in M.

The purpose of this subsection is to explain several methods for computing colon modules of finitely generated modules over affine K -algebras. We first reduce the problem to the case of submodules of a finitely generated free P -module, where P = K[x_{1}, …, x_{n}] is a polynomial ring as above.

Proposition 3.2.18. Let J be an ideal in P, let U be a finitely generated module over the K -algebra P/J, and let M and N be two P/J -submodules of U. Furthermore, let I be an ideal in P containing J. Our goal is to compute N :_{M} (I/J).

Suppose we are given a presentation U ≅ P^{r}/V with a P -submodule V of P^{r}. We can write M ≅ M′/V and N ≅ N′/V with P -submodules M′ and N′ of P^{r} containing V . Then N :_{M} (I/J) is the residue class module of N′ :_{M′} I in U.

Proof. The module N :_{M} (I/J) is given by {v̄ ∈ M′/V | (I/J)·v̄ ⊆ N′/V }. This set is {v̄ ∈ M′/V | I·v ⊆ N′ for every v ∈ M′ with residue class v̄ ∈ U}. Therefore it is the image of {v ∈ M′ | I ·v ⊆ N′} in U. The last set is nothing but N′ :_{M′} I which proves the claim. □

Example 3.2.19. Let R be the K -algebra with K -basis {1, ε}, where we have ε^{2} = 0, let N = ⟨(1, ε)⟩ ⊆ R^{2} , and let \overline{I} be the ideal \overline{I} = (ε) in R. Suppose we want to compute N :_{R^{2}} \overline{I}.

To this end, we first write R in the form R = P/(x^{2}) with P = K[x]. Here ε is the image of x in R, and \overline{I} is the image of the ideal I = (x). Then we notice that R^{2} = P^{2}/V for V = ⟨(x^{2}, 0), (0, x^{2})⟩, and that N = N′/V for N′ = ⟨(1, x), (x^{2}, 0), (0, x^{2})⟩. Thus the desired colon module is the image of N′ :_{P^{2}} I in R^{2} .

As a consequence of this proposition, we shall now restrict our attention to the case where M and N are P -submodules of P^{r} and I is an ideal in P. In a manner similar to the last subsection, we begin by explaining the computation of the colon module of a submodule by a principal ideal. We present two methods for doing this calculation, one based on a syzygy module computation, and one based on performing a certain intersection of two submodules.

Lemma 3.2.20. Let M = ⟨g_{1}, …, g_{s}⟩ and N = ⟨h_{1}, …, h_{t}⟩ be two P -sub-modules of P^{r}, and let f ∈ P \ {0}. Furthermore, let {v_{1}, …, v_{u}} ⊆ P^{r} be a system of generators of the P -module fM ∩ N. For i = 1, …, u, we may write v_{i} = fw_{i} for some w_{i} ∈ M. Then we have

N :_{M} (f) = ⟨w_{1}, …, w_{u}⟩

In particular, we compute N :_{M} (f) as follows. Let {ṽ_{1}, …, ṽ_{ℓ}} ⊆ P^{s+t} be a system of generators of the module Syz(fg_{1}, …, fg_{s}, h_{1}, …, h_{t}). If we write ṽ_{j} = (f_{1j}, …, f_{s+t j}) with f_{1j}, …, f_{s+t j} ∈ P for j = 1, …, ℓ, then

N :_{M} (f) = ⟨∑_{i=1}^{s} f_{ij}g_{i} | 1 ≤ j ≤ ℓ⟩

Proof. First we observe that f · w_{i} = v_{i} ∈ fM ∩ N ⊆ N implies that w_{i} ∈ N :_{M} (f) for i = 1, …, u. Conversely, if we start with an element m ∈ N :_{M} (f), we have fm ∈ fM ∩ N. Thus we can represent fm in the form fm = ∑_{i=1}^{u} a_{i}v_{i} = ∑_{i=1}^{u} a_{i}fw_{i} with a_{1}, …, a_{u} ∈ P. We cancel f and obtain m = ∑_{i=1}^{u} a_{i}w_{i} ∈ ⟨w_{1}, …, w_{u}⟩, as we wanted to show.

To prove the additional claim, it suffices to apply Proposition 3.2.3.a to compute the intersection fM ∩ N. □

Example 3.2.21. When we apply part a) of this lemma in the situation of the previous example, we see that we have to compute xP^{2} ∩ N′ = ⟨(x, 0), (0, x)⟩ ∩ ⟨(1, x), (x^{2}, 0), (0, x^{2})⟩. The result is ⟨(x, 0), (0, x^{2})⟩. Therefore we have N′ :_{P^{2}} I = ⟨(1, 0), (0, x)⟩, and the colon module N :_{R^{2}} \overline{I} we were originally interested in equals ⟨(1, 0), (0, ε)⟩.

For the computation of colon modules in the general case, we have again the choice between reductions to the case of principal ideals and a direct method. As we saw before, it is enough to treat submodules of P^{r}.

Proposition 3.2.22. (Computation of Colon Modules) Let M = ⟨g_{1}, …, g_{s}⟩ and N = ⟨h_{1}, …, h_{t}⟩ be two P -submodules of P^{r}, let G = (g_{1}, …, g_{s}), let H = (h_{1}, …, h_{t}), and let I ⊆ P be an ideal generated by a set of polynomials {f_{1}, …, f_{ℓ}}.

a) We may compute N :_{M} I by using Lemma 3.2.20 and the formula

N :_{M} I = ⋂_{i=1}^{ℓ} N :_{M} (f_{i})

b) Consider the following block matrix of size rℓ × (s + ℓt)

M = ( \begin{matrix}f_{1}G & H & 0 & ⋯ & 0 \\ f_{2}G & 0 & H & ... & ⋮ \\ ⋮ & ⋮ & ... & ... & 0 \\ f_{ℓ}G & 0 & ⋯ & 0 & H \end{matrix} )

Let {v_{1}, …, v_{u}} ⊆ P^{s+ℓt} be a system of generators of the syzygy module Syz(M). We write v_{j} = (f_{1j}, …, f_{sj}, f_{1j}^{(1)}, … f_{tj}^{(1)}, . . . . . . , f_{1j}^{(ℓ)}, …, f_{tj}^{(ℓ)})

with f_{1j}, …, f_{tj}^{(ℓ)} ∈ P for j = 1, …, u. Then we have

N :_{M} I = ⟨∑_{i=1}^{s} f_{ij}g_{i} | j = 1, …, u⟩

Proof. Part a) follows directly from the definitions. Therefore we prove claim b). Let w_{1}, …, w_{s}, w_{1}^{(1)}, …, w_{t}^{(1)}, . . . . . . , w_{1}^{(ℓ)}, …, w_{t}^{(ℓ)} be the column vectors of M. We have ∑_{i=1}^{s} f_{ij}w_{i} = − ∑_{m=1}^{ℓ}(∑_{i=1}^{t} f_{ij}^{(m)}w_{i}^{(m)}) for every j = 1, …, u. If we consider the k^{th} batch of t components of this equation, we see that f_{k}(∑_{i=1}^{s} f_{ij}g_{i}) = ∑_{i=1}^{t} f_{ij}^{(k)}h_{i} for j = 1, …, u and k = 1, …, ℓ. Hence we get ∑_{i=1}^{s} f_{ij}g_{i} ∈ N :_{M} I for j = 1, …, u.

Conversely, let v = ∑_{i=1}^{s} a_{i}g_{i} ∈ N :_{M} I with a_{1}, …, a_{s} ∈ P. Then there exist polynomials a_{11}, …, a_{tℓ} ∈ P such that f_{k}v = ∑_{i=1}^{t} a_{ik}h_{i} for k = 1, …, ℓ. By combining these equations into a vector equation, we get

a_{1}w_{1}+⋯+a_{s}w_{s}−(a_{11}w_{1}^{(1)}+⋯+a_{t1}w_{t}^{(1)}+· · · · · ·+a_{1ℓ}w_{1}^{(ℓ)}+⋯+a_{tℓ}w_{t}^{(ℓ)}) = 0

Therefore there exist polynomials p_{1}, …, p_{u} ∈ P such that the column vector given by (a_{1}, …, a_{s}, −a_{11}, …, −a_{t1}, . . . . . . , −a_{1ℓ}, …, −a_{tℓ})^{tr} is equal to ∑_{j=1}^{u} p_{j}v_{j}. The first s components of this equality yield the claim. □

The previous propositions provide us with a way to check whether a given sequence of polynomials is a regular sequence for a given finitely generated P -module. Regular sequences are defined as follows.

Definition 3.2.23. Let R be a ring and U an R-module.

a) An element f ∈ R is called a non-zerodivisor for U if f ·m = 0 implies m = 0 for all m ∈ U.

b) A sequence of elements f_{1}, …, f_{ℓ} ∈ R is called a regular sequence for U or an U -regular sequence if we have (f_{1}, …, f_{ℓ})U ≠ U and if f_{i} is a non-zerodivisor for U/(f_{1}, …, f_{i−1})U for i = 1, …, ℓ.

The definition of a non-zerodivisor for U obviously generalizes the one given for U = R in Section 1.1. If the ring R in this definition is our polynomial ring P, two polynomials f, g ∈ P \ {0} form a P -regular sequence if and only if they are coprime. For three polynomials in P, the question whether they form a P -regular sequence may depend on their order (see Tutorial 33.b).

Now let U be a finitely generated P -module. In order to check whether a given sequence of polynomials is a regular sequence for U, we can choose a presentation U ≅ P^{r}/N and apply the following corollary.

Corollary 3.2.24. (Regular Sequence Test) Let M = ⟨g_{1}, …, g_{s}⟩ be a P -submodule of P^{r}, let N be a P -submodule of M, and let f_{1}, …, f_{ℓ} ∈ P. For j = 0, …, ℓ, we define N_{j} = (f_{1}, …, f_{j})M + N. Then the following conditions are equivalent.

a) The sequence f_{1}, …, f_{ℓ} is a regular sequence for M/N.

b) There exists an index i ∈ {1, …, s} such that g_{i} ∉ N_{ℓ}, and we have N_{j−1} :_{M} (f_{j}) ⊆ N_{j−1} for j = 1, …, ℓ.

c) Let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. For j = 1, …, ℓ, we let {h_{j1}, …, h_{ju_{j}}} be a system of generators of N_{j−1} :_{M} (f_{j}). Then there exists an index i ∈ {1, …, s} such that NF_{σ,N_{ℓ}}(g_{i}) ≠ 0, and we have NF_{σ,N_{j−1}}(h_{j1}) = ⋯ = NF_{σ,N_{j−1}}(h_{ju_{j}}) = 0 for j = 1, …, ℓ.

Proof. The equivalence of a) and b) is an immediate consequence of the definition if we use U = M/N and observe that (f_{1}, …, f_{j})U = N_{j}/N and U/(f_{1}, …, f_{j})U = M/N_{j}. The equivalence of b) and c) follows from the Submodule Membership Test 2.4.10. □

The following example gives a non-trivial case of three polynomials f_{1}, f_{2}, f_{3} ∈ P which do not form a regular sequence.

Example 3.2.25. In the ring P = K[x_{1}, x_{2}, x_{3}, x_{4}], consider f_{1} = x_{2}x_{4}−x_{3}^{2} , f_{2} = x_{1}x_{4} −x_{2}x_{3} , and f_{3} = x_{1}x_{3} −x_{2}^{2} . We want to use the corollary to check whether f_{1}, f_{2}, f_{3} is a regular sequence for P.

The ideal (f_{1}, f_{2}, f_{3}) is proper, so only the conditions on the colon ideals have to be checked. Clearly, any two of the three polynomials are coprime, and thus form a regular sequence. The computation of (f_{1}, f_{2}) :_{P} (f_{3}) yields (x_{3}, x_{4}). Neither of the two elements x_{3}, x_{4} is contained in (f_{1}, f_{2}). Therefore f_{1}, f_{2}, f_{3} is not a regular sequence for P.

Exercise 1. In this exercise we anticipate a theme which will be discussed more thoroughly in Chapter IV. Let K be a field, let P = K[x_{1}], and let f, g ∈ P \ \{0\}. In \overline{P} = K[x_{0}, x_{1}], we consider the homogenizations F = x_{0}^{deg(f)} · f( \frac{x_{1}}{x_{0}} ) and G = x_{0}^{deg(g)} · g( \frac{x_{1}}{x_{0}} ). Show that

gcd(f, g) = gcd(F, G)|_{x_{0}=1}

Deduce an algorithm which finds gcd(f, g) by computing the elements of degree ≤ deg(f) + deg(g) of a Gröbner basis of the ideal (F, G). Hint: First show that x_{0} does not divide the homogenization of any polynomial and that the homogenization of a product is the product of the homogenizations.

Exercise 2. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let σ be a term ordering on 𝕋^{n}, and let f, g ∈ P be such that LT_{σ}(f) and LT_{σ}(g) are coprime. Show that f and g are coprime.

Exercise 3. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, and let r ≥ 3. Find r non-zero submodules M_{1}, …, M_{r} of P^{r} such that M_{i} ∩ M_{j} ≠ 0 for 1 ≤ i < j ≤ s and ∩_{i=1}^{r}M_{i} = 0.

Exercise 4. Let R be a ring, and let M, N, as well as U be three P -submodules of a given R-module. Assume that M ⊇ N or M ⊇ U. Then prove the modular law

M ∩ (N + U) = M ∩ N + M ∩ U

Exercise 5. Let R be a ring, let 𝔞, I, and J be ideals of R, and let S be the residue class ring S = R/𝔞. Denote by \overline{I} and \overline{J} the ideals of S generated by the images of I and J, respectively. Prove that

\overline{I} ∩ \overline{J} = ((I + 𝔞) ∩ (J + 𝔞))/𝔞

Exercise 6. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, and let M = ⟨g_{1}, …, g_{s}⟩ and N = ⟨h_{1}, …, h_{t}⟩ be two P -submodules of P^{r}. Prove that the following conditions are equivalent.

a) N ⊆ M

b) There exists a matrix A = \binom{B}{I_{t}} over P , where B is of size s × t and I_{t} is the identity matrix of size t × t, such that the columns of A generate the module Syz(g_{1}, …, g_{s}, h_{1}, …, h_{t}).

Exercise 7. Let R be a ring, and let I, J, I_{1}, I_{2}, …, I_{n} be ideals in R. Prove the following rules for colon ideals.

a) (I :_{R} J) · J ⊆ I

b) (I_{1} :_{R} I_{2}) :_{R} I_{3} = (I_{1} :_{R} I_{3}) :_{R} I_{2}

c) (I_{1} :_{R} I_{2}) :_{R} I_{3} = I_{1} :_{R} (I_{2}I_{3})

d) (I_{1} ∩ ⋯ ∩ I_{n}) :_{R} J = (I_{1} :_{R} J) ∩ ⋯ ∩ (I_{n} :_{R} J)

e) I :_{R} (I_{1} + ⋯ + I_{n}) = (I :_{R} I_{1}) ∩ ⋯ ∩ (I :_{R} I_{n})

Exercise 8. Let 𝔭 and 𝔮 be prime ideals in a ring R such that 𝔮 is not contained in 𝔭. Show that (𝔭 ∩ 𝔮) :_{R} 𝔮 = 𝔭.

Exercise 9. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, and let a, b, c, d ∈ P \ {0}. Prove that the following conditions are equivalent.

a) ⟨(a, b)⟩ :_{P} ⟨(c, d)⟩ ≠ 0

b) ad = bc

Exercise 10. Let K be a field, let P = K[x_{1}, …, x_{n}], let r ≥ 1, and let M be a P -submodule of P^{r} with a system of generators of the form {fg_{1}, …, fg_{s}}, where f ∈ P and g_{1}, …, g_{s} ∈ P^{r} \ {0}.

a) Show that M :_{P^{r}} (f) = ⟨g_{1}, …, g_{s}⟩.

b) Now let r = 1 and g′_{i} = g_{i}/ gcd(g_{1}, …, g_{s}) for i = 1, …, s. Prove that (g_{1}, …, g_{s}) :_{P} (gcd(g_{1}, …, g_{s})) = (g′_{1}, …, g′_{s}).

Exercise 11. Triples of integers (a, b, c) ∈ ℤ^{3} \ {(0, 0, 0)} satisfying the equation a^{2} + b^{2} = c^{2} are called Pythagorean triples. A Pythagorean triple (a, b, c) is called fundamental if gcd(a, b, c) = 1. A Pythagorean triple (a, b, c) is called positive if (a, b, c) ∈ ℕ^{3} \ {(0, 0, 0)}. a) Prove that fundamental Pythagorean triples are in 1–1 correspondence

with rational points on the circle C = Z(x^{2} + y^{2} − 1) ⊆ \overline{ℚ}^{2} , i.e. with points (a, b) ∈ ℚ^{2} such that a^{2} + b^{2} − 1 = 0.

b) Find a point on C which does not correspond to a Pythagorean triple. Let ℓ ∈ ℚ[x, y] be a linear polynomial defining a line L = Z(ℓ) ⊆ \overline{ℚ}^{2} through the point P = (0, 1).

c) Prove that L intersects C in precisely one other point P′, unless ℓ is a multiple of y − 1.

d) Show that P′ is a rational point of C and that its vanishing ideal is the colon ideal (x^{2}+y^{2}−1, ℓ) :_{ℚ [x,y]} (x, y−1) = (x^{2}+y^{2}−1, ℓ) :_{ℚ [x,y]} (y−1).

e) Write a CoCoA function Pythagoras(…) which computes a specified number of fundamental positive Pythagorean triples in the following way.

1) Choose random numbers a, b ∈ ℚ \ {0} and let ℓ = ax + b(y − 1).

2) Compute the vanishing ideal I(P′).

3) Determine the monic generators x − p and y − q of I(P′).

4) Find the corresponding fundamental positive Pythagorean triple.

Tutorial 30: Computation of Intersections

The purpose of this tutorial is to implement and study the algorithms for computing intersections of submodules of P^{r} introduced in the first subsection. Let K be a field, let P = K[x_{1}, …, x_{n}], let r ≥ 1, let ℓ ≥ 2, and let M_{1}, …, M_{ℓ} ⊆ P^{r} be P -submodules given by sets of vectors which generate them.

a) Write CoCoA functions Intersect1(…) and Intersect2(…) which compute the intersection module M_{1} ∩ M_{2} using the methods of Proposition 3.2.3.a and 3.2.3.b, respectively.

b) Apply your functions Intersect1(…) and Intersect2(…) to compute the intersections of the following ideals and modules.

1) M_{1} = (x^{2}y^{2} − x^{2}) and M_{2} = (x^{2}y + xy^{2}) in ℚ[x, y]

2) M_{1} = (x^{3} + y^{2} − 1, xy − x + 3) and M_{2} = (xy^{2} − 1) in ℚ[x, y]

3) M_{1} = ⟨(x, y−z), (z, y)⟩ and M_{2} = ⟨(z, y+1), (x, y−1)⟩ in ℚ[x, y, z]^{2} 4) M_{1} = ⟨(xy, y, x), (y^{2}, y, x), (x, −y, −y)⟩ and M_{2} = ⟨(0, x − y, x − y),

(x, x, x), (0, 0, x^{2} + x + y^{2} − y − 2xy), (0, x^{2} + x, x^{2} + x)⟩ in ℚ[x, y]^{3} c) Write CoCoA functions MultiIntersect1(…) and MultiIntersect2(…)

which compute the intersection module M_{1} ∩⋯∩M_{ℓ} using the methods of Proposition 3.2.7.a and 3.2.7.b, respectively.

d) Apply your functions MultiIntersect1(…) and MultiIntersect2(…) to compute the intersections of the ideals and modules given in b) and the following additional ideals and modules.

1) M_{3} = (x^{2}y − xy^{2})

2) M_{3} = (x, y) and M_{4} = (x − y^{2} + 2)

3) M_{3} = ⟨(x, y), (0, y^{2} − 1)⟩ and M_{4} = ⟨(xyz, 0)⟩

4) M_{3} = ⟨(xy, 0, 0), (x^{2}, 0, 0), (y^{2}, 0, 0)⟩

e) Let r = 1. Prove that if we compute a Gröbner basis of Syz(M) with respect to a module term ordering of type PosTo in Proposition 3.2.3.b, then the resulting system of generators {f_{11}, …, f_{1u}} of the intersection ideal M_{1} ∩ M_{2} is a Gröbner basis with respect to the term ordering To.

f) Find an example which shows that the claim of e) is not true if we use a module term ordering of type ToPos.

g) Let R = P/I be an affine K -algebra, where I is an ideal in P, and let N_{1}, …, N_{ℓ} be R-submodules of R^{r}/U, where U is an R-submodule of R^{r}. Suppose we are given lists of vectors in P^{r} representing systems of generators of N_{1}, …, N_{ℓ}. Explain how one can compute a list of vectors in P^{r} whose residue classes generate N_{1} ∩ ⋯ ∩ N_{ℓ}.

Tutorial 31: Computation of Colon Ideals and Colon Modules

In the second and third subsection we saw a number of different ways to compute colon ideals and colon modules. In this tutorial we want to implement those methods and compare their efficiency. We shall also see some useful properties of colon ideals and study the associated primes of a module.

Let K be a field, let P = K[x_{1}, …, x_{n}], let f ∈ P, let r ≥ 1, and let M = ⟨g_{1}, …, g_{s}⟩ and N = ⟨h_{1}, …, h_{t}⟩ be two P -submodules of P^{r}.

a) Show that N :_{P} M = P if and only if M ⊆ N.

b) For r = 1, show that N :_{P} M ⊇ N. Find ideals N ⊂ M ⊂ P such that N :_{P} M = N.

c) Using the two methods of Proposition 3.2.15, write two CoCoA functions ColonI1(…) and ColonI2(…) which take the tuples G = (g_{1}, …, g_{s}) and H = (h_{1}, …, h_{t}) and compute the colon ideal N :_{P} M.

d) Apply your functions ColonI1(…) and ColonI2(…) in the following cases.

1) M = (x^{4}, x^{3}z, x^{2}z^{2}, xz^{3}, z^{4}) and N = (x^{4}z^{4}, x^{3}yz^{3}, x^{2}y^{2}z^{2}, xy^{3}z, y^{4}) in P = ℚ[x, y, z]

2) M = (x − 1, y − 1, z − 1)^{5} and N = (x + y + z − 3)^{3} in P = ℚ[x, y, z]

3) M = (x−1, y−1, z−1)^{2}∩(x, y, z) and N = (x, y, z) in P = ℚ[x, y, z]

4) M = ⟨(x, y), (y, x)⟩ and N = ⟨(x^{2}, y^{2})⟩ in P^{2} = ℚ[x, y]^{2} Which function tends to be faster? In what follows, we let R be a Noetherian ring and U a non-zero finitely

generated R-module. A prime ideal of R is called an associated prime of U if it is the annihilator of a cyclic R-submodule of U.

e) Show that there always exists an associated prime of U.

Hint: Prove that the set of ideals {Ann_{R}(u) | u ∈ U \{0}} has a maximal element with respect to inclusion and that this maximal element is a prime ideal. f) Prove that the union of the associated primes of U is precisely the set of

zerodivisors for this module.

g) Prove that there are only finitely many associated primes of U. Hint: First show that there exists a chain of R-submodules 0 = U_{0} ⊆ U_{1} ⊆ ⋯ ⊆ U_{ℓ} = U such that U_{i}/U_{i−1} ≅ R/𝔭_{i} with a prime ideal 𝔭_{i} ⊆ R for i = 1, …, ℓ. Then prove that the associated primes of U are contained in {𝔭_{1}, …, 𝔭_{ℓ}}.

h) In the following cases, try to use your function ColonI1(…) to find an associated prime 𝔭 of the P -module P^{r}/M and an element v ∈ P^{r}/M such that 𝔭 = Ann_{P} (v). Can you find all associated primes in each case?

1) M = (x^{3} + 3x^{2}y + y^{2} + y, y^{2} + 2x + y) in P = ℚ[x, y]

2) M = ⟨(y^{2} − 2y + 1, z^{2}), (xz, yz − z)⟩ in P^{2} = ℚ[x, y, z]^{2}

i) Implement the different methods for computing N :_{M} (I), where I is an ideal in P, which derive from Proposition 3.2.22 and Proposition 3.2.7.a in three CoCoA functions ColonM1(…) and ColonM2(…) and ColonM3(…). Apply your functions in the following cases. Which function tends to be faster?

1) P = ℚ[x, y, z], N = ⟨(x, y), (y, xy)⟩, M = ⟨(xy, yz)⟩, I = (x^{2}, y^{2}). Hint: The result is ⟨(x^{3}y − xy^{3}, x^{2}yz − y^{3}z)⟩.

2) P = ℚ[x, y, z], N = ⟨(x^{2}, xy, y^{2}), (y^{2}, yz, z^{2})⟩, M = ⟨(x, 0, 0), (y, 0, 0)⟩, I = (x, y, z).

3) P = ℚ[x, y, z], N = ⟨(x^{2}, xy, y^{2}), (y^{2}, yz, z^{2}), (x^{2}, xz, z^{2})⟩, M = ⟨(x, 0, 0), (0, y, 0), (0, 0, z)⟩, I = (x, y, z).

3.3 Homomorphisms of Modules

The four seasons are salt, pepper, mustard, and vinegar. (from “Kids Say the Darndest Things”)

In this section we dish up two courses: our first subsection gives a brief outline of computational linear algebra, and the second makes an initial step into the realm of computational homological algebra. As in the previous section, our recipe will be to reduce all computational tasks to calculations of syzygy modules.

For starters, we treat the standard fare of linear algebra. We consider the problem of computing presentations for the kernels and images of linear maps between modules (see Proposition 3.3.1). Then we add a little spice by discussing liftings along linear maps (see Proposition 3.3.6). This topic gives us a foretaste of more advanced applications such as pullbacks (see also Tutorial 32), inductive and projective limits, and maps between complexes.

In the second part of this section we try to cook up a recipe for calculating Hom-modules. More precisely, we observe that the set of homomorphisms between two finitely generated modules carries a natural module structure itself, and we aim to find a presentation of this module. We need a number of refined ingredients, each of which merits careful sampling: flattening isomorphisms (see Proposition 3.3.9), explicit descriptions of the functoriality of the covariant and the contravariant Hom-functors (see Proposition 3.3.13), and some exactness properties of those Hom-functors (see Proposition 3.3.14).

Finally, we can serve up the resulting algorithm for computing a presentation of a Hom-module (see Theorem 3.3.15) which reduces this task to the calculation of the kernel of a linear map. This second part of the section is more difficult to digest, not so much because the matter is deeper, but rather because the complexity of the objects makes the reading more challenging. Although it is peppered by healthy tidbits of knowledge for your further mathematical life, there is no great harm in skipping it at first reading, since in the rest of this volume we do not make further use of it.

As usual, in order to perform effective computations we have to assume certain finiteness conditions. As in preceding sections, it turns out that the appropriate generality we can deal with is the theory of finitely generated modules over affine K -algebras over a field K. However, we still have a choice as to how to represent such modules. We could consider only submodules of finitely generated free modules over a polynomial ring P = K[x_{1}, …, x_{n}]. Or we could consider modules given by subquotients, i.e. by residue class modules of submodules of finitely generated free modules over P, and so on.

The best choice, in our opinion, is to present the theory for quotients of finitely generated free modules over P, i.e. for modules of the form P^{r}/M, where M is a P -submodule of P^{r}. The reason goes back to Corollary 3.2.6 where we saw how to find such a presentation for an arbitrary subquotient. In Remark 3.3.3 we give hints on how to deal with some other situations.

For the remainder of this section, we let K be a field, P = K[x_{1}, …, x_{n}] a polynomial ring over K, and R = P/I an affine K -algebra. Given two finitely generated R-modules, we write them as P^{r}/M and P^{s}/N, where r, s > 0 and M ⊆ P^{r} as well as N ⊆ P^{s} are P -submodules. In this section, to avoid overburdening the notation, we denote the canonical basis of P^{a} by {e_{1}, …, e_{a}}.

3.3.A Kernels, Images, and Liftings of Linear Maps

Our first goal is to show how one can compute presentations of the kernel and the image of a P -linear map φ : P^{r}/M ⟶ P^{s}/N. To this end, we write

φ(e_{j} + M) = w_{j} + N

where w_{j} = (f_{1j}, …, f_{sj}) and f_{ij} ∈ P for i = 1, …, s and j = 1, …, r. Furthermore, let {g_{1}, …, g_{α}} be a system of generators of M, and let {h_{1}, …, h_{β}} be a system of generators of N.

Proposition 3.3.1. (Kernels and Images of Linear Maps) Let φ : P^{r}/M ⟶ P^{s}/N be a P -linear map as above, and let {v_{1}, …, v_{u}} be a system of generators of the syzygy module Syz(w_{1}, …, w_{r}, h_{1}, …, h_{β}). For j = 1, …, u, we write those syzygies as v_{j} = (k_{1j}, …, k_{r+β j}) with k_{1j}, …, k_{r+β j} ∈ P.

a) The kernel of φ is given by Ker(φ) = ⟨(k_{1j}, …, k_{rj}) + M | j = 1, …, u⟩.

b) A presentation of the image of φ is given by the exact sequence

P^{u} ⟶^{ψ} P^{r} ⟶^{φ∘π} Im(φ) ⟶ 0

where ψ is defined by ψ(e_{j}) = (k_{1j}, …, k_{rj}) for j = 1, …, u, and where π : P^{r} −↠ P^{r}/M is the canonical homomorphism.

c) Let {(ℓ_{1j}, …, ℓ_{u+α j}) | j = 1, …, u′} be a system of generators of the module Syz(ψ(e_{1}), …, ψ(e_{u}), g_{1}, …, g_{α}), where ℓ_{1j}, …, ℓ_{u+α j} ∈ P for j = 1, …, u′. Then a presentation of the kernel of φ is given by the exact sequence

P^{u′} ⟶^{ψ′} P^{u} ⟶^{π∘ψ} Ker(φ) ⟶ 0

where ψ′ is defined by ψ′(e_{j}) = (ℓ_{1j}, …, ℓ_{uj}) for j = 1, …, u′.

Proof. To prove a), we note that φ is induced by the map λ : P^{r} ⟶ P^{s} which is given by λ(e_{j}) = w_{j} for j = 1, …, r. Thus Ker(φ) is the image of λ^{−1}(N) in P^{r}/M, and the claim follows from Lemma 3.2.2.

The same result yields claim b), because Ker(φ ∘ π) = λ^{−1}(N), as we can see from the commutative diagram

P^{r}  ⟶^{λ} P^{s}
↓^{π}  ↓
P^{r}/M ⟶^{φ} P^{s}/N

Finally, we note that claim a) says that Ker(φ) is the image of the map π ∘ ψ : P^{u} ⟶ P^{r}/M. Then claim c) follows by applying b) to this map. □

Let us illustrate the results of this proposition with a concrete example.

Example 3.3.2. Consider the ring P = ℚ[x, y] and the two P -submodules M = ⟨(x, −y − 1, 0)⟩ of P^{3} and N = ⟨(x^{2}, 0), (0, x^{3}), (y, 0), (0, y)⟩ of P^{2} . The P -linear map φ′ : P^{3} ⟶ P^{2}/N defined by φ′(e_{1}) = (xy, y + 1) + N, φ′(e_{2}) = (x^{2}, x) + N, and φ′(e_{3}) = (y, 1) + N vanishes on M, because φ′(x, −y − 1, 0) = x(xy, y + 1) − (y + 1)(x^{2}, x) + N = (−x^{2}, 0) + N = 0 + N. Hence φ′ induces a P -linear map φ : P^{3}/M ⟶ P^{2}/N.

In order to find the kernel of φ, we have to compute the syzygy module Syz((xy, y + 1), (x^{2}, x), (y, 1), (x^{2}, 0), (0, x^{3}), (y, 0), (0, y)). We get the system of generators {(0, 0, −y, 0, 0, y, 1), (1, 0, −1, 0, 0, −x + 1, −1), (0, 1, −x, −1, 0, x, 0), (x, −y, −x, 0, 0, x, 0), (0, 0, −x^{3}, 0, 1, x^{3}, 0)}. Therefore Ker(φ) is generated by {(0, 0, −y) + M, (1, 0, −1) + M, (0, 1, −x) + M, (x, −y, −x) + M, (0, 0, −x^{3}) + M}, and Im(φ) has a presentation of the form P^{5} ⟶ P^{3} ⟶ Im(φ) ⟶ 0.

To get a presentation of Ker(φ), we have to compute the syzygy module Syz((0, 0, −y), (1, 0, −1), (0, 1, −x), (x, −y, −x), (0, 0, −x^{3}), (x, −y − 1, 0)). We get the system of generators {(0, 0, −1, 1, 0, −1), (−x, −x, y, 1, 0, 0), (0, x^{3}, −x^{2}y, −x^{2}, y, 0)}. Notice that the second generator means that our system of generators of Ker(φ) can be shortened. By part c) of the propo-

sition, Ker(φ) has a presentation of the form P^{3} ⟶^{ψ′} P^{5} ⟶ Ker(φ) ⟶ 0, where ψ′(e_{1}) = (0, 0, −1, 1, 0), ψ′(e_{2}) = (−x, −x, y, 1, 0), and ψ′(e_{3}) = (0, x^{3}, −x^{2}y, −x^{2}, y).

The proposition above is often applied in slightly modified ways to compute various operations involving homomorphisms of modules. Here we mention just two of them and leave it to the imagination of the reader to find more.

Remark 3.3.3. Let φ : P^{r}/M ⟶ P^{s}/N be a P -linear map as above, and let U ⊆ P^{s} be a further P -submodule which contains N and is generated by vectors {u_{1}, …, u_{γ}} ⊆ P^{s}.

a) A presentation of the preimage φ^{−1}(U/N) of U/N under the homomorphism φ can be computed by applying Proposition 3.3.1.c to find a presentation of the kernel of the composite map P^{r}/M ⟶^{φ} P^{s}/N −↠ P^{s}/U, where the second homomorphism is the canonical homomorphism.

b) Suppose we want to find the kernel of a P -linear map φ : U ⟶ P^{s}/N, where U = ⟨u_{1}, …, u_{r}⟩ is an explicitly given P -submodule of a finitely generated free P -module. We can compute the kernel of the P -linear map ψ : P^{r} ⟶ P^{s}/N defined by ψ(e_{i}) = φ(u_{i}) for i = 1, …, r. Then Ker(φ) is the image of Ker(ψ) under the canonical map P^{r} −↠ U.

Besides being able to compute presentations of the kernel and the image of a linear map, we need one more ingredient which enables us to treat most linear algebra questions about finitely generated modules: we need to be able to lift a map from a free P -module to an arbitrary finitely generated module along a homomorphism to that module. More generally, liftings along linear maps are defined as follows.

Definition 3.3.4. Let R be a ring, let U, V , and W be R-modules, let μ : V ⟶ W be an R-linear map, and let ψ : U ⟶ W be another R-linear map which satisfies Im(ψ) ⊆ Im(μ). Then a lifting of ψ along μ is an R-linear map λ : U ⟶ V such that ψ = μ ∘ λ.

In other words, the map λ is a lifting of ψ along μ if it makes the following diagram commutative.

[figure: V; W; U; μ; ψ; λ]

Proposition 3.3.5. (Existence of a Lifting Along a Linear Map) Let R be a ring, let t ≥ 1, let V and W be R-modules, let μ : V ⟶ W be an R-linear map, and let ψ : R^{t} ⟶ W be another R-linear map which satisfies Im(ψ) ⊆ Im(μ). Then there exists a lifting of ψ along μ.

Proof. Let {e_{1}, …, e_{t}} be the canonical basis of R^{t}, and let w_{i} = ψ(e_{i}) for i = 1, …, t. The assumption that Im(ψ) ⊆ Im(μ) implies that there exist v_{1}, …, v_{t} ∈ V such that μ(v_{i}) = w_{i} for i = 1, …, t. Then it suffices to define the R-linear map λ : R^{t} ⟶ V by λ(e_{i}) = v_{i} for i = 1, …, t. □

In the case of a linear map φ : P^{r}/M ⟶ P^{s}/N as above, we can compute a lifting along φ explicitly. The main ingredient to solve this task is our method to deal with explicit membership, as explained in Corollary 3.1.9.a.

Proposition 3.3.6. (Computation of a Lifting Along a Linear Map) Let φ : P^{r}/M ⟶ P^{s}/N be a P -linear map as above and ψ : P^{t} ⟶ P^{s}/N another P -linear map which satisfies Im(ψ) ⊆ Im(φ). Let ψ be given by ψ(e_{i}) = p_{i} + N for i = 1, …, t, where p_{1}, …, p_{t} ∈ P^{s}.

Using Explicit Membership 3.1.9.a, we can compute a matrix B = (b_{ij}) of polynomials such that (p_{1}, …, p_{t}) = (w_{1}, …, w_{r}, h_{1}, …, h_{β}) · B. Then the P -linear map λ : P^{t} ⟶ P^{r}/M defined by e_{j} ⟼ b_{1j}e_{1} + ⋯ + b_{rj}e_{r} + M for j = 1, …, t is a lifting of ψ along φ.

Proof. First of all, the assumption Im(ψ) ⊆ Im(φ) implies p_{i} ∈ ⟨w_{1}, …, w_{r}, h_{1}, …, h_{β}⟩. Therefore we can use Corollary 3.1.9.a and get a matrix B with the required property. Since we know that ψ(e_{j}) = p_{j} + N for j = 1, …, t, we can check that

(φ ∘ λ)(e_{j}) = φ(b_{1j}e_{1} + ⋯ + b_{rj}e_{r} + M) = b_{1j}w_{1} + ⋯ + b_{rj}w_{r} + N = p_{j} + N

for j = 1, …, t. Thus we see that ψ = φ ∘ λ, as was claimed. □

Let us do an explicit computation of a lifting using the map introduced in Example 3.3.2.

Example 3.3.7. Consider the map φ : P^{3}/M ⟶ P^{2}/N defined in Example 3.3.2, and let ψ : P ⟶ P^{2}/N be the P -linear map defined by ψ(1) = (x^{3} + y^{2}, 2x^{2}) + N. This map satisfies Im(ψ) ⊆ Im(φ), because we can use Explicit Membership 3.1.9.a to find a representation (x^{3} +y^{2}, 2x^{2}) = x(x^{2}, x) + (x^{2} + y)(y, 1) − x^{2}(y, 0) − (0, y).

In particular, we see that ψ(1) + N = xφ(e_{2}) + (x^{2} + y)φ(e_{3}) + N. Hence the map λ : P ⟶ P^{3}/M defined by λ(1) = (0, x, x^{2} + y) + M is a lifting of ψ along φ.

3.3.B Hom-Modules

Pesto a-a zeneise. (Genueser Delikatesse)

After having computed the most important objects associated to one module homomorphism, we now want to describe Hom_{P} (P^{r}/M, P^{s}/N), the module of all P -linear maps φ : P^{r}/M ⟶ P^{s}/N. Recall that for two such homomorphisms φ and ψ, and for f ∈ P, the module structure of Hom_{P} (P^{r}/M, P^{s}/N) is given by

(φ + ψ)(v + M) = φ(v + M) + ψ(v + M) and (f · φ)(v + M) = f · φ(v + M)

for all v ∈ P^{r}. Our goal is to describe Hom_{P} (P^{r}/M, P^{s}/N) by generators and relations, i.e. to compute an explicit presentation.

As a first step, we treat the easiest case M = ⟨0⟩ and N = ⟨0⟩. In this situation, there is clearly an isomorphism Hom_{P} (P^{r}, P^{s}) ⟶ P^{rs}, and our only task is to make it explicit. Given r, s > 0, we denote by Mat_{s,r}(P) the set of matrices with s rows, r columns, and entries in P. Using componentwise sum and multiplication by a polynomial, Mat_{s,r}(P) has a natural P -module structure. The next definition recalls the well-known way to associate a matrix to a linear map and provides the other ingredient for solving the first step.

Definition 3.3.8. Let r and s be positive integers.

a) Given a P -module homomorphism φ ∈ Hom_{P} (P^{r}, P^{s}), let φ(e_{j}) = (a_{1j}, …, a_{sj}) for j = 1, …, r, and let A_{φ} = (a_{ij}) ∈ Mat_{s,r}(P). This construction yields a map

Λ_{r,s} : Hom_{P} (P^{r}, P^{s}) ⟶ Mat_{s,r}(P)

We say that A_{φ} = Λ_{r,s}(φ) = (φ(e_{1}), …, φ(e_{r})) is the matrix associated to φ.

b) The map Fl_{s,r} : Mat_{s,r}(P) ⟶ P^{rs} which sends a matrix A = (a_{ij}) to the vector (a_{11}, a_{21}, …, a_{s1}, a_{12}, a_{22}, …, a_{s2}, . . . . . . , a_{1r}, a_{2r}, …, a_{sr}) is clearly an isomorphism of P -modules. It is called a flattening isomorphism.

Recall that, given two P -linear maps φ : P^{r} ⟶ P^{s} and ψ : P^{s} ⟶ P^{t}, the matrix associated to their composition is the product of their associated matrices, i.e. we have Λ_{r,t}(ψ ∘ φ) = Λ_{s,t}(ψ) · Λ_{r,s}(φ). By combining the two maps Λ_{r,s} and Fl_{s,r}, we obtain the desired explicit representation of the Hom-module Hom_{P} (P^{r}, P^{s}).

Proposition 3.3.9. Let r and s be positive integers.

a) The P -linear map map Λ_{r,s} : Hom_{P} (P^{r}, P^{s}) ⟶ Mat_{s,r}(P) is an isomorphism.

b) The P -linear map Φ_{r,s} = Fl_{s,r} ∘ Λ_{r,s} : Hom_{P} (P^{r}, P^{s}) ⟶ P^{rs} is an isomorphism.

Proof. Since we have already noticed that Fl_{s,r} is an isomorphism, it suffices to prove a). The fact that the map Λ_{r,s} is a P -module homomorphism comes from the very definitions. If Λ_{r,s}(φ) is the zero matrix, then φ(e_{j}) = 0 for j = 1, …, r, and thus φ is the zero map. Given a matrix A ∈ Mat_{s,r}(P), we define a map φ ∈ Hom_{P} (P^{r}, P^{s}) by φ(e_{j}) = (a_{1j}, …, a_{sj}) for j = 1, …, r. Clearly, we have A = Λ_{r,s}(φ) which concludes the proof. □

Our next goal is to understand better how the isomorphisms Φ_{r,s} behave when we compose them with maps which are defined using the functoriality of the Hom-module. The Hom-module is functorial in its two arguments in the following sense.

Definition 3.3.10. Let R be a ring, and let U, V , and W be R-modules.

a) For every R-linear map φ : U ⟶ V , we introduce a corresponding R-linear map φ^{∗} : Hom_{R}(V, W) ⟶ Hom_{R}(U, W) by φ^{∗}(λ) = λ ∘ φ for all λ ∈ Hom_{R}(V, W). We denote it by φ^{∗} = Hom_{R}(φ, W) and say that Hom_{R}(—, W) is the contravariant Hom-functor.

b) For every R-linear map ψ : V ⟶ W, we introduce a corresponding R-linear map ψ_{∗} : Hom_{R}(U, V) ⟶ Hom_{R}(U, W) by ψ_{∗}(λ) = ψ ∘ λ for all λ ∈ Hom_{R}(U, V). We denote it by ψ_{∗} = Hom_{R}(U, ψ) and say that Hom_{R}(U, —) is the covariant Hom-functor.

Given P -linear maps φ : P^{r} ⟶ P^{r′} and ψ : P^{s} ⟶ P^{s′}, we can apply the above isomorphisms Φ_{i,j} to both ends of the homomorphisms φ^{∗} = Hom_{P} (φ, P^{s}) and ψ_{∗} = Hom_{P} (P^{r}, ψ). Then there are P -linear maps φ̃ and ψ̃ such that the diagrams

Hom_{P} (P^{r′}, P^{s}) ⟶^{φ^{∗}} Hom_{P} (P^{r}, P^{s})
↓^{Φ_{r′,s}}  ↓^{Φ_{r,s}}
P^{r′s}  \underrightarrow{φ̃}  P^{rs}

and  \begin{matrix}Hom_{P} (P^{r}, P^{s}) & ⟶^{ψ_{∗}} & Hom_{P} (P^{r}, P^{s′}) \\ ↓^{Φ_{r,s}} & & ↓^{Φ_{r,s′}} \\ P^{rs} & \underrightarrow{ψ̃} & P^{rs′} \end{matrix}

are commutative. In other words, we let φ̃ = Φ_{r,s} ∘ φ^{∗} ∘ (Φ_{r′,s})^{−1} and ψ̃ = Φ_{r,s′} ∘ ψ_{∗} ∘ (Φ_{r,s})^{−1} . In order to find the matrices associated to φ̃ and ψ̃, we proceed in two steps.

Remark 3.3.11. Given P -linear maps φ : P^{r} ⟶ P^{r′} and ψ : P^{s} ⟶ P^{s′}, let φ^{∗} = Hom_{P} (φ, P^{s}) and ψ_{∗} = Hom_{P} (P^{r}, ψ). In this situation, we define a P -linear map \overline{φ} : Mat_{s,r′}(P) ⟶ Mat_{s,r}(P) by right multiplication by A_{φ}, i.e. by \overline{φ}(B) = B · A_{φ} for every B ∈ Mat_{s,r′}(P).

Furthermore, we define a P -linear map \overline{ψ} : Mat_{s,r}(P) ⟶ Mat_{s′,r}(P) by left multiplication by A_{ψ}, i.e. by \overline{ψ}(B) = A_{ψ} · B for every B ∈ Mat_{s,r}(P). Then we have two diagrams

Hom_{P} (P^{r′}, P^{s}) ⟶^{φ^{∗}} Hom_{P} (P^{r}, P^{s})
↓^{Λ_{r′,s}}  ↓^{Λ_{r,s}}
Mat_{s,r′}(P) ⟶^{\overline{φ}} Mat_{s,r}(P)

and

Hom_{P} (P^{r}, P^{s}) ⟶^{ψ_{∗}} Hom_{P} (P^{r}, P^{s′})
↓^{Λ_{r,s}}  ↓^{Λ_{r,s′}}
Mat_{s,r}(P) ⟶^{\overline{ψ}} Mat_{s′,r}(P)

Both of these diagrams are commutative, because the matrix associated to a composition of two linear maps is the product of the two matrices associated to the individual maps.

Now we are going to make the second step, namely the explicit construction of the commutative diagrams involving \overline{φ} and φ̃ resp. \overline{ψ} and ψ̃. The necessary matrices are defined as follows.

Definition 3.3.12. Let A = (a_{ij}) ∈ Mat_{r,r′}(P) and B = (b_{ij}) ∈ Mat_{s,s′}(P) be two matrices over P. Then the block matrix

( \begin{matrix}a_{11}B & ⋯ & a_{1r′}B \\ ⋮ & & ⋮ \\ a_{r1}B & ⋯ & a_{rr′}B \end{matrix} )

of size rs × r′s′ is called the tensor product or the outer product or the Kronecker product of A and B, and is denoted by A ⊗ B.

In linear algebra, there is the notion of the tensor product of linear maps between vector spaces. The preceding definition is related to that notion, but it would lead us too far away to discuss this connection. If the matrix A is the identity matrix of size r × r, the tensor product A ⊗ B is simply the block matrix

( \begin{matrix}B & 0 & ⋯ & 0 \\ 0 & B & ... & ⋮ \\ ⋮ & ... & ... & 0 \\ 0 & ⋯ & 0 & B \end{matrix} )

Proposition 3.3.13. Let φ : P^{r} ⟶ P^{r′} and ψ : P^{s} ⟶ P^{s′} be P -linear maps, let φ^{∗} = Hom_{P} (φ, P^{s}), and let ψ_{∗} = Hom_{P} (P^{r}, ψ).

a) Let \overline{φ} be the map defined by right multiplication by A_{φ}, and let φ̃ be the map whose associated matrix is A_{φ}^{tr} ⊗ I_{s}. Then we have a commutative diagram of P -linear maps

Mat_{s,r′}(P) ⟶^{\overline{φ}} Mat_{s,r}(P)
↓^{Fl}_{s,r′}  ↓^{Fl}^{s,r}
P^{r′s}  \underrightarrow{φ̃}  P^{rs}

b) Let \overline{ψ} be the map defined by left multiplication by A_{ψ}, and let ψ̃ be the map whose associated matrix is I_{r} ⊗ A_{ψ}. Then we have a commutative diagram of P -linear maps

Mat_{s,r}(P) ⟶^{\overline{ψ}} Mat_{s′,r}(P)
↓^{Fl}^{s,r}  ↓^{Fl}_{s′,r}
P^{rs}  \underrightarrow{ψ̃}  P^{rs′}

Proof. First we show claim a). Let A_{φ} = (a_{ij}) ∈ Mat_{r′,r}(P) be the matrix associated to φ. We start with a tuple (f_{11}, f_{21}, …, f_{s1}, …, f_{1r′}, f_{2r′} …, f_{sr′}) in P^{r′s}. This tuple is the image of the matrix F = (f_{ij}) under the map Fl_{s,r′}. By Remark 3.3.11, we have \overline{φ}(F) = F · A_{φ}, and for i = 1, …, s and j = 1, …, r, the (i, j)-entry of this matrix is ∑_{k=1}^{r′} f_{ik}a_{kj}. By applying the isomorphism Fl_{s,r}, we see that the image of our original tuple (f_{11}, f_{21}, …, f_{sr′}) under the map φ̃ is

(∑_{k=1}^{r′}f_{1k}a_{k1}, ∑_{k=1}^{r′}f_{2k}a_{k1}, …, ∑_{k=1}^{r′}f_{sk}a_{k1}, …, ∑_{k=1}^{r′}f_{1k}a_{kr}, ∑_{k=1}^{r′}f_{2k}a_{kr}, …, ∑_{k=1}^{r′}f_{sk}a_{kr})

Using this description of φ̃, it is easy to check that its associated matrix is indeed A_{φ}^{tr} ⊗ I_{s}.

Now we prove claim b) in a similar fashion. Let A_{ψ} = (a_{ij}) ∈ Mat_{s′,s}(P) be the matrix associated to ψ. Starting again with a tuple (f_{11}, f_{21}, …, f_{s1}, …, f_{1r}, f_{2r}, …, f_{sr}) in P^{rs} whose preimage under Fl_{s,r} is F = (f_{ij}), we see that the (i, j)-entry of \overline{ψ}(F) = A_{ψ} · F is given by ∑_{k=1}^{s} a_{ik}f_{kj} for i = 1, …, s′ and j = 1, …, r. Thus the image under ψ̃ of the original tuple is given by

( ∑_{k=1}^{s} a_{1k}f_{k1}, ∑_{k=1}^{s}a_{2k}f_{k1}, …, ∑_{k=1}^{s}a_{s′k}f_{k1}, …, ∑_{k=1}^{s}a_{1k}f_{kr}, ∑_{k=1}^{s}a_{2k}f_{kr}, …, ∑_{k=1}^{s}a_{s′k}f_{kr})

Again it is easy to use this description to check that I_{r} ⊗A_{ψ} is the associated matrix of ψ̃. □

To perform our computation of Hom-modules in the general case, i.e. when M and N are not necessarily zero, we still need one more ingredient, namely the following exactness properties of the covariant and the contravariant Hom-functors.

Proposition 3.3.14. Let R be a ring, let U_{1} ⟶^{φ} U_{2} ⟶^{ψ} U_{3} ⟶ 0 be an exact sequence of R-modules, let t ≥ 1, and let V be a further R-module.

a) If we let φ_{∗} = Hom_{R}(R^{t}, φ) and ψ_{∗} = Hom_{R}(R^{t}, ψ), then

Hom_{R}(R^{t}, U_{1}) ⟶^{φ_{∗}} Hom_{R}(R^{t}, U_{2}) ⟶^{ψ_{∗}} Hom_{R}(R^{t}, U_{3}) ⟶ 0

is an exact sequence of R-modules.

b) If we let φ^{∗} = Hom_{R}(φ, V) and ψ^{∗} = Hom_{R}(ψ, V), then

0 ⟶ Hom_{R}(U_{3}, V) ⟶^{ψ^{∗}} Hom_{R}(U_{2}, V) ⟶^{φ^{∗}} Hom_{R}(U_{1}, V)

is an exact sequence of R-modules.

Proof. To prove a), we first show Im(φ_{∗}) = Ker(ψ_{∗}). For every map λ ∈ Hom_{R}(R^{r}, U_{1}), we have Im(φ ∘ λ) ⊆ Im(φ) = Ker(ψ), and therefore ψ_{∗}(φ_{∗}(λ)) = ψ ∘ φ ∘ λ = 0. Conversely, if we are given an element λ ∈ Ker(ψ_{∗}), then ψ ∘ λ = 0 implies Im(λ) ⊆ Ker(ψ) = Im(φ). By Proposition 3.3.5, it follows that there exists a map λ′ ∈ Hom_{R}(R^{t}, U_{1}) such that λ = φ ∘ λ′ = φ_{∗}(λ′). Thus we get λ ∈ Im(φ_{∗}), as we wanted to show.

Next we prove the surjectivity of the map ψ_{∗}. Let {ε_{1}, …, ε_{t}} denote the canonical basis of R^{t}. Given a map λ ∈ Hom_{R}(R^{t}, U_{3}), we have λ(ε_{i}) ∈ U_{3} = Im(ψ) for i = 1, …, t. Therefore we can choose elements u_{1}, …, u_{t} ∈ U_{2} such that λ(ε_{i}) = ψ(u_{i}) for i = 1, …, t. Then we define an R-linear map λ′ : R^{t} ⟶ U_{2} by λ′(ε_{i}) = u_{i} for i = 1, …, t. Clearly, this map λ′ satisfies ψ_{∗}(λ′) = ψ ∘ λ′ = λ, and we get λ ∈ Im(ψ_{∗}), as desired.

To prove claim b), we start again by showing Im(ψ^{∗}) = Ker(φ^{∗}). For a map λ ∈ Hom_{R}(U_{3}, V), we have φ^{∗}(ψ^{∗}(λ)) = λ ∘ ψ ∘ φ = 0, because ψ ∘ φ = 0. This shows Im(ψ^{∗}) ⊆ Ker(φ^{∗}). Conversely, let λ ∈ Ker(φ^{∗}) be given, i.e. let λ : U_{2} ⟶ V be an R-linear map such that λ ∘ φ = 0. Then Ker(ψ) = Im(φ) ⊆ Ker(λ) shows that λ induces \overline{λ} : U_{2}/ Ker(ψ) ⟶ V . Similarly, the surjection ψ induces an isomorphism \overline{ψ} : U_{2}/ Ker(ψ) ⟶ U_{3} . Thus we obtain a map λ′ = \overline{λ} ∘ (\overline{ψ})^{−1} : U_{3} ⟶ V . Now we denote the canonical homomorphism U_{2} ⟶ U_{2}/ Ker(ψ) by ε and get from \overline{λ} = λ′ ∘ \overline{ψ} the desired conclusion λ = \overline{λ} ∘ ε = λ′ ∘ \overline{ψ} ∘ ε = λ′ ∘ ψ = ψ^{∗}(λ′) ∈ Im(ψ^{∗}).

Finally, we show that the map ψ^{∗} is injective. Suppose that we have ψ^{∗}(λ) = λ ∘ ψ = 0 for some map λ ∈ Hom_{R}(U_{3}, V). Then we obtain the relations U_{3} = Im(ψ) ⊆ Ker(λ) ⊆ U_{3} which imply Ker(λ) = U_{3} , i.e. λ = 0, and we are done. □

At this point we have all the necessary ingredients for cooking up our algorithm. After all the trouble we had to go through in this subsection in order to arrive here, the following theorem yields an algorithm for computing Hom-modules which is of surprising simplicity. The final meal does not always show the efforts which went into preparing it!

Theorem 3.3.15. (Computation of Hom-Modules) Let M = ⟨g_{1}, …, g_{α}⟩ ⊆ P^{r} and N = ⟨h_{1}, …, h_{β}⟩ ⊆ P^{s} be two P -sub-modules. Let G be the matrix of size r × α whose columns are g_{1}, …, g_{α}, let H be the matrix of size s × β whose columns are h_{1}, …, h_{β}, let U be the P -submodule of P^{rs} which is generated by the column vectors of the matrix I_{r} ⊗ H of size rs × rβ, and let V be the P -submodule of P^{αs} which is generated by the column vectors of the matrix I_{α} ⊗ H of size αs × αβ. Finally, let λ : P^{rs} ⟶ P^{αs} be the P -linear map whose associated matrix is G^{tr} ⊗ I_{s}.

a) The map λ satisfies the inclusion λ(U) ⊆ V and induces a P -linear map \overline{λ} : P^{rs}/U ⟶ P^{αs}/V .

b) The P -module Hom_{P} (P^{r}/M, P^{s}/N) is isomorphic to Ker(\overline{λ}). In particular, a presentation of Hom_{P} (P^{r}/M, P^{s}/N) can be computed by using Proposition 3.3.1.c to find a presentation of the kernel of \overline{λ}.

c) Let ϑ ∈ Hom_{P} (P^{r}/M, P^{s}/N) be represented, as an element of Ker(\overline{λ}), by the residue class (a_{11}, a_{21}, …, a_{s1}, . . . . . . , a_{r1}, a_{r2}, …, a_{rs}) + U. Then the map ϑ is induced by the P -linear map Θ : P^{r} ⟶ P^{s} whose associated matrix is A_{Θ} = (a_{ij}).

Proof. First we apply Proposition 3.3.14 to the presentations

P^{α} ⟶^{φ} P^{r} ⟶ P^{r}/M ⟶ 0  and  P^{β} ⟶^{ψ} P^{s} ⟶ P^{s}/N ⟶ 0

where φ(e_{i}) = g_{i} for i = 1, …, α and ψ(e_{j}) = h_{j} for j = 1, …, β. We get the following fundamental diagram (1). Its maps are defined by applying the covariant and contravariant Hom-functors to the various maps in the two presentations. It is easy to check that this diagram is in fact commutative.

Hom_{P} (P^{r}, P^{β}) ⟶ Hom_{P} (P^{α}, P^{β})
(1) ↓ ↓
Hom_{P} (P^{r}, P^{s}) ⟶ Hom_{P} (P^{α}, P^{s})
↓  ↓
0 ⟶ Hom_{P} (P^{r}/M, P^{s}/N) ⟶ Hom_{P} (P^{r}, P^{s}/N) ⟶ Hom_{P} (P^{α}, P^{s}/N)
↓  ↓
0  0

In order to prove a), we need to construct four further commutative diagrams. By the definition of the P -linear map φ_{s}^{∗} = Hom_{P} (φ, P^{s}), we have a commutative diagram

(2)  \begin{matrix}Hom_{P} (P^{r}, P^{s}) & ⟶^{φ_{s}^{∗}} & Hom_{P} (P^{α}, P^{s}) \\ ↓^{Φ_{r,s}} & & ↓^{Φ_{α,s}} \\ P^{rs} & \underrightarrow{φ̃_{s}} & P^{αs} \end{matrix}

By Proposition 3.3.13.a, the map λ is precisely φ̃_{s}.

Similarly, by the definition of the P -linear maps (ψ_{α})_{∗} = Hom_{P} (P^{α}, ψ) and (ψ_{r})_{∗} = Hom_{P} (P^{r}, ψ), we have two commutative diagrams

(3) \begin{matrix}Hom_{P} (P^{α}, P^{β}) & ⟶^{(ψ_{α})_{∗}} & Hom_{P} (P^{α}, P^{s}) \\ ↓^{Φ_{α,β}} & & ↓^{Φ_{α,s}} \\ P^{αβ} & \underrightarrow{ψ̃_{α}} & P^{αs} \end{matrix}

and (4)  \begin{matrix}Hom_{P} (P^{r}, P^{β}) & ⟶^{(ψ_{r})_{∗}} & Hom_{P} (P^{r}, P^{s}) \\ ↓^{Φ_{r,β}} & & ↓^{Φ_{r,s}} \\ P^{rβ} & \underrightarrow{ψ̃_{r}} & P^{rs} \end{matrix}

Using Remark 3.3.11 and Proposition 3.3.13.b, we see that the matrices associated to the maps ψ̃_{α} and ψ̃_{r} are I_{α} ⊗ H and I_{r} ⊗ H, and their images are V and U, respectively.

Finally, we let φ_{β}^{∗} = Hom_{P} (φ, P^{β}) and observe that the diagram

(5)

Hom_{P} (P^{r}, P^{β}) ⟶^{(ψ_{r})_{∗}} Hom_{P} (P^{r}, P^{s})
↓^{φ_{β}^{∗}}  ↓^{φ_{s}^{∗}}
Hom_{P} (P^{α}, P^{β}) ⟶^{(ψ_{α})_{∗}} Hom_{P} (P^{α}, P^{s})

is commutative, because φ_{s}^{∗}((ψ_{r})_{∗}(γ)) = ψ ∘ γ ∘ φ = (ψ_{α})_{∗}(φ_{β}^{∗}(γ)) for all γ ∈ Hom_{P} (P^{r}, P^{β}).

Now we are ready to prove claim a). Using the above diagrams, we calculate

λ(U) = Im(λ ∘ ψ̃_{r}) = Im(φ̃_{s} ∘ ψ̃_{r} ∘ Φ_{r,β}) =_{(4)} Im(φ̃_{s} ∘ Φ_{r,s} ∘ (ψ_{r})_{∗})
=_{(2)} Im(Φ_{α,s} ∘ φ_{s}^{∗} ∘ (ψ_{r})_{∗}) =_{(5)} Im(Φ_{α,s} ∘ (ψ_{α})_{∗} ∘ φ_{β}^{∗})
=_{(3)} Im(ψ̃_{α} ∘ Φ_{α,β} ∘ φ_{β}^{∗}) ⊆ Im(ψ̃_{α}) = V

To prove b), we note that in diagram (4) both Φ_{r,β} and Φ_{r,s} are isomorphisms. Therefore also the induced map \overline{Φ}_{r,s} between the cokernels of (ψ_{r})_{∗} and ψ̃_{r} is an isomorphism. Similarly, we can use diagram (3) and get an induced isomorphism \overline{Φ}_{α,s} between the cokernels of (ψ_{α})_{∗} and ψ̃_{α}. Thus we have two more commutative diagrams

(6) \begin{matrix}Hom_{P} (P^{r}, P^{s}) & −↠ & Hom_{P} (P^{r}, P^{s}/N) \\ ↓^{Φ_{r,s}} & & ↓\overline{Φ}_{r,s} \\ P^{rs} & −↠ & P^{rs}/U \end{matrix}

and (7)  \begin{matrix}Hom_{P} (P^{α}, P^{s}) & −↠ & Hom_{P} (P^{α}, P^{s}/N) \\ ↓^{Φ_{α,s}} & & ↓\overline{Φ}_{α,s} \\ P^{αs} & −↠ & P^{αs}/V \end{matrix}

By combining diagrams (2), (6), (7), and the lower right part of the fundamental diagram (1), we find that also the diagram

Hom_{P} (P^{r}, P^{s}/N) ⟶^{Λ} Hom_{P} (P^{α}, P^{s}/N)
↓\overline{Φ}_{r,s}  ↓\overline{Φ}_{α,s}
P^{rs}/U  ⟶^{\overline{λ}}  P^{αs}/V

is commutative, where Λ = Hom_{P} (φ, P^{s}/N). Since Hom_{P} (P^{r}/M, P^{s}/N) is isomorphic to the kernel of Λ by the fundamental diagram (1), and since the two vertical maps are isomorphisms, the claim Hom_{P} (P^{r}/M, P^{s}/N) ≅ Ker(\overline{λ}) follows.

To prove c), we let Θ : P^{r} ⟶ P^{s} be the P -linear map whose associated matrix is A_{Θ} = (a_{ij}). Using Definition 3.3.8.b, we see that the image of Θ in P^{rs} is the tuple (a_{11}, …, a_{rs}). In view of diagrams (2) and (7), this implies that the map ϑ : P^{r}/M ⟶ P^{s}/N induced by Θ corresponds to the residue class (a_{11}, …, a_{rs}) + U ∈ P^{rs}/U. □

To conclude this section, we compute an explicit example.

Example 3.3.16. Once more we let P = ℚ[x, y], and we use the P -sub-modules M = ⟨(x, −y − 1, 0)⟩ of P^{3} and N = ⟨(x^{2}, 0), (0, x^{3}), (y, 0), (0, y)⟩ of P^{2} introduced in Example 3.3.2. Our goal is to compute a presentation of Hom_{P} (P^{3}/M, P^{2}/N) using Theorem 3.3.15. In our case α = 1, r = 3, β = 4, s = 2, G = \binom{{x \atop −y−1}}{0}, H = ({x^{2} \atop 0} {0 \atop x^{3}} {y \atop 0} {0 \atop y} ), U is the P -submodule of P^{6}

generated by the columns of the matrix I_{3}⊗H, and V is the submodule of P^{2} generated by the columns of the matrix I_{1} ⊗ H = H. Moreover, the matrix G^{tr} ⊗ I_{2} = ({x \atop 0} {0 \atop x} {−y−1 \atop 0} {0 \atop −y−1} {0 \atop 0} {0 \atop 0}) defines a P -linear map λ : P^{6} ⟶ P^{2}, and it is easy to check that λ(U) ⊆ V . Thus we obtain a P -linear map \overline{λ} : P^{6}/U ⟶ P^{2}/V .

Our goal is to find a presentation of the P -module Hom_{P} (P^{3}/M, P^{2}/N). In view of the theorem, we can apply Proposition 3.3.1.a to compute a system of generators of Ker(\overline{λ}). We get Hom_{P} (P^{3}/M, P^{2}/N) = ⟨φ_{1}, φ_{2}, …, φ_{8}⟩, where φ_{1} corresponds to (x, 0, 0, 0, 0, 0) + U, φ_{2} to (0, x^{2}, 0, 0, 0, 0) + U, φ_{3} to (0, 0, 0, 0, 1, 0) + U, φ_{4} to (0, 0, 0, 0, 0, 1) + U, φ_{5} to (0, 0, y, 0, 0, 0) + U, φ_{6} to (0, 0, 0, y, 0, 0)+U, φ_{7} to (1, 0, x, 0, 0, 0)+U, and φ_{8} to (0, 1, 0, x, 0, 0)+U.

Next we use Proposition 3.3.1.c and compute the presentation

P^{12} ⟶^{μ} P^{8} ⟶^{ν} Hom_{P} (P^{3}/M, P^{2}/N) ⟶ 0

where ν is given by ν(e_{i}) = φ_{i} for i = 1, …, 8 and μ is associated to

A_{μ} = ( \begin{matrix}0 & 0 & 0 & 0 & y & x & −1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & y & x & −1 & 0 \\ y & 0 & 0 & 0 & 0 & 0 & 0 & x^{2} & 0 & 0 & 0 & 0 \\ 0 & y & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & x^{3} \\ 0 & 0 & x & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & x & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & −y & 0 & 0 & 0 & x & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & −y & 0 & 0 & 0 & 0 & 0 & 0 & x^{2} & 0 \end{matrix} )

Finally, let us consider the P -linear map φ : P^{3}/M ⟶ P^{2}/N defined in Example 3.3.2. It is induced by the P -linear map Φ : P^{3} ⟶ P^{2} whose associated matrix is A_{Φ} = ({xy \atop y+1} {x^{2} \atop x} {y \atop 1} ). By part c) of the theo-

rem, the map φ is represented by (xy, y + 1, x^{2}, x, y, 1) + U as an element of Ker(\overline{λ}). Using Explicit Membership 3.1.9.a, we can find the representation φ = (y − 1)φ_{1} + yφ_{3} + φ_{4} − xφ_{6} + xφ_{7} + (y + 1)φ_{8} of φ in terms of the generators of Hom_{P} (P^{3}/M, P^{2}/N).

Exercise 1. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, and let φ : P^{r}/M ⟶ P^{s}/N be a P -linear map as in Subsection 3.3.A. Explain how one can compute a presentation of Coker(φ) = (P^{s}/N)/ Im(φ).

Exercise 2. Let K be a field, let P = K[x, y], let f = x + y − 1, and let I = (y(y − 1), f) ⊆ P . Compute the kernel of the multiplication map μ_{f} : P/I^{2} ⟶ P/I^{2} defined by g + I^{2} ↦ fg + I^{2} .

Exercise 3. Let P = K[x, y, z] be a polynomial ring over a field K, and let a, b ∈ ℕ such that b ≥ a. Prove that multiplication by x^{b−a}y^{b−a}z^{b−a} yields a well-defined P -linear map φ : P/(x^{a}, y^{a}, z^{a}) ⟶ P/(x^{b}, y^{b}, z^{b}) and that φ is injective.

Exercise 4. Let P = K[x, y] be a polynomial ring in two indeterminates over a field K, let G = (x, y), and let I be the ideal generated by {x, y}.

a) Show that there is no P -linear map φ : I ⟶ P such that we have φ(fx + gy) = f for all f, g ∈ P .

b) Use a presentation of I to prove that Hom_{P} (I, P) ≅ ⟨(x, y)⟩ ⊆ P^{2} .

c) Find a non-trivial P -linear map φ : I ⟶ P .

Exercise 5. Let R be a ring, let I be an ideal in R, and let M be an R-module. Prove that Hom_{R}(R/I, M) ≅ 0 :_{M} I.

Exercise 6. Let R be a ring, let M and N be R-modules, and let φ : M ⟶ N be an R-linear map. The map

φˇ = Hom_{R}(φ, R) : Hom_{R}(N, R) ⟶ Hom_{R}(M, R)

is called the dual map of φ.

a) Given an exact sequence 0 ⟶ M′ ⟶^{φ} M ⟶^{ψ} M′′ ⟶ 0 of R-mod-ules, show that the dual sequence

0 ⟶ Hom_{R}(M′′, R) ⟶^{ψ}ˇ Hom_{R}(M, R) ⟶^{φ}ˇ Hom_{R}(M′, R)

is exact. Give an example in which the map φˇ is not surjective.

b) Prove that the map φˇ in a) is surjective if there exists an R-linear map ϱ : M′′ ⟶ M such that ψ ∘ ϱ = id_{M′′}.

c) Let K be a field, let P = K[x_{1}, …, x_{n}], and let φ : P^{r} ⟶ P^{s}. What is the matrix associated to the composition of P -linear maps

P^{s} ⟶^{Φ_{s,1}^{−1}} Hom_{P} (P^{s}, P) ⟶^{φ}ˇ Hom_{P} (P^{r}, P) ⟶^{Φ_{r,1}} P^{r} ?

Exercise 7. Let R be a ring, and let M be an R-module. Show that the following conditions are equivalent.

a) Given R-modules U and V and R-linear maps φ : U ⟶ V and ψ : M ⟶ V such that Im(ψ) ⊆ Im(φ), there always exists a lifting of ψ along φ.

b) Given R-modules U and V and an R-linear map φ : U ⟶ V which is surjective, the map Hom_{R}(M, φ) : Hom_{R}(M, U) ⟶ Hom_{R}(M, V) is also surjective.

c) For every surjective R-linear map π : V ⟶ M, there is an R-linear map ψ : M ⟶ V such that π ∘ ψ = id_{M}.

d) There exists a free R-module U and an R-submodule V ⊆ U such that U ≅ V ⊕ M.

A module M satisfying these conditions is called a projective module. Clearly, free R-modules are projective modules. (Hint: To prove that c) implies d), use the surjective map ⊕_{m∈M}R · e_{m} ⟶ M given by e_{m} ↦ m for all m ∈ M.)

Exercise 8. Let R be a ring, let 0 ⟶ U_{1} ⟶^{φ} U_{2} ⟶^{ψ} U_{3} be an exact sequence of R-modules, and let V be a further R-module. For the maps φ_{∗} = Hom_{R}(V, φ) and ψ_{∗} = Hom_{R}(V, ψ), show that

0 ⟶ Hom_{R}(V, U_{1}) ⟶^{φ_{∗}} Hom_{R}(V, U_{2}) ⟶^{ψ_{∗}} Hom_{R}(V, U_{3})

is an exact sequence of R-modules.

Tutorial 32: Computing Kernels and Pullbacks

Most of the computations presented in the previous sections can be considered as special cases of computations of kernels of certain module homomorphisms. The purpose of this tutorial is to study some concrete instances of this general phenomenon.

We start with the situation introduced at the beginning of this section. In particular, we let M = ⟨g_{1}, …, g_{α}⟩ ⊆ P^{r} and N = ⟨h_{1}, …, h_{β}⟩ ⊆ P^{s} be two P -submodules and φ : P^{r}/M ⟶ P^{s}/N a P -module homomorphism.

a) Implement the algorithms of Proposition 3.3.1 for the computation of generators of Ker(φ) and presentations of Im(φ) and Ker(φ) in CoCoA functions KernelGens(…), ImagePres(…), and KernelPres(…), respectively.

b) Apply your functions from a) to compute the kernels and images of the following homomorphisms φ : P^{r}/M ⟶ P^{s}/N, where P = ℚ[x, y, z], r = 3, M = ⟨(−x, −y, 1)⟩, s = 2, and N = ⟨(x, y), (y, z), (z, x)⟩. (Notice that φ(e_{3} + M) is determined uniquely by φ(e_{1} + M) and φ(e_{2} + M).)

1) φ(e_{1} + M) = (1, x^{2} + xy + y^{2}) + N, φ(e_{2} + M) = (xyz − 1, 0) + N 2) φ(e_{1} + M) = (x^{3} − z − 1, y^{3} − z − 1) + N, φ(e_{2} + M) = (1, 1) + N 3) φ(e_{1} + M) = (x − 1, y − 1) + N, φ(e_{2} + M) = (y − 1, z − 1) + N

c) Let R be a ring, let M_{1} , M_{2} , and M_{3} be three R-modules, and let φ_{1} : M_{1} ⟶ M_{3} and φ_{2} : M_{2} ⟶ M_{3} be two R-linear maps. Show that there exists an R-module N with the following properties.

1) There are R-linear maps ψ_{1} : N ⟶ M_{1} and ψ_{2} : N ⟶ M_{2} such that φ_{1} ∘ ψ_{1} = φ_{2} ∘ ψ_{2} .

2) If N′ is a further R-module such that there are two R-linear maps ψ′_{1} : N′ ⟶ M_{1} and ψ′_{2} : N′ ⟶ M_{2} satisfying φ_{1} ∘ ψ′_{1} = φ_{2} ∘ ψ′_{2} , then there exists an R-linear map λ : N′ ⟶ N such that ψ′_{1} = ψ_{1}∘λ and ψ′_{2} = ψ_{2} ∘ λ.

Furthermore, this module N is unique up to a unique isomorphism of R-modules. Together with the two maps ψ_{1} and ψ_{2} , the module N is called the pullback of φ_{1} and φ_{2} . Property 2) is called the universal property of the pullback. Hint: Look at d) to get a clue how to construct the pullback.

._{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.} _{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}  ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} M_{2}  M_{3} N  M_{1} N′  φ_{1} ψ_{2} ψ_{1} φ_{2} ψ′_{2}  ψ′_{1} λ

d) Prove that, given two P -linear maps φ_{1} : P^{k} ⟶ P^{r} and φ_{2} : P^{l} ⟶ P^{r} between finitely generated free P -modules, the pullback of φ_{1} and φ_{2} can be computed as the kernel of the P -linear map ψ : P^{k+l} ⟶ P^{r} defined by ψ((f_{1}, …, f_{k+l})) = φ_{1}((f_{1}, …, f_{k})) − φ_{2}((f_{k+1}, …, f_{k+l})).

e) Write a CoCoA function Pullback(…) which takes two matrices over P having the same number of rows and computes the pullback of the two P -linear maps defined by those matrices.

f) Show that the intersection M ∩ N can be computed using the pullback of the maps λ : P^{α} ⟶ P^{r} given by λ(e_{i}) = g_{i} for i = 1, …, α and μ : P^{β} ⟶ P^{r} given by μ(e_{i}) = h_{i} for i = 1, …, β. Use your function Pullback(…) to compute the intersections of the submodules defined in Tutorial 30.b and compare your results with those of that tutorial.

g) Show that the annihilator of an element m + M of P^{r}/M can be computed using the pullback of the map λ and the map ν : P ⟶ P^{r} given by 1 ↦ m. Can you find the annihilator Ann_{P} (P^{r}/M) using a single pullback computation? (Hint: Look at Proposition 3.2.15.b.)

h) Show that, for a polynomial f ∈ P, the colon module M :_{P^{r}} (f) can be computed using the pullback of the map λ and the map δ : P^{r} ⟶ P^{r} given by e_{i} ↦ fe_{i} for i = 1, …, r. Can you find the colon module M :_{P^{r}} I for an ideal I ⊆ P using a single pullback computation? (Hint: Look at Proposition 3.2.22.b.)

Tutorial 33: The Depth of a Module

Let R be a Noetherian ring, let M be a finitely generated R-module, and let I be an ideal in R such that IM ≠ M. Generalizing Definition 3.2.23 slightly, we shall say that a tuple of elements (f_{1}, …, f_{ℓ}) ∈ R^{ℓ} is called an M -regular sequence in I if f_{1}, …, f_{ℓ} is a regular sequence for M and if f_{i} ∈ I for i = 1, …, ℓ.

An M -regular sequence (f_{1}, …, f_{ℓ}) in I is called maximal if there is no M -regular sequence in I of the form (f_{1}, …, f_{ℓ}, f_{ℓ+1}). It can be shown that all maximal M -regular sequences in I have the same length (cf. [Ku80], VI.3.1). This length is called the I -depth of M and is denoted by depth_{I}(M). In this tutorial we want to study some properties of the I -depth of a module and find a way to compute it.

a) Let f, g ∈ R such that (f, g) is an M -regular sequence in I, and assume that g is a non-zerodivisor for M. Then show that also (g, f) is an M -regular sequence in I.

b) Let R = K[x, y, z] be the polynomial ring in three indeterminates over a field K. Prove that the tuple (x^{2} − x, xy − 1, xz) is an R-regular sequence in the ideal it generates, but (x^{2} − x, xz, xy − 1) is not an R-regular sequence in that ideal.

c) Prove that if the ideal I is contained in the union of finitely many prime ideals of R, it is already contained in one of them.

d) Show that the following conditions are equivalent.

1) depth_{I}(M) = 0

2) ⟨0⟩ :_{M} I ≠ ⟨0⟩

3) Hom_{R}(R/I, M) ≠ 0 Hint: Use Tutorial 31 and part c).

e) Let R = K[x_{1}, …, x_{n}] be a polynomial ring over a field K and let M be a finitely generated R-module given by an explicit presentation M = R^{r}/⟨g_{1}, …, g_{s}⟩, where g_{1}, …, g_{s} ∈ R^{r}. Write a CoCoA program IsDepth0(…) which takes a tuple of vectors (g_{1}, …, g_{s}) and a tuple of polynomials (f_{1}, …, f_{t}), checks whether the R-module M has I -depth zero with respect to I = (f_{1}, …, f_{t}), and returns the corresponding Boolean value. Hint: Use part d) and Theorem 3.3.15.

f) Let r ≥ 1, and let 0 ⟶ N ⟶ R^{r} ⟶ M ⟶ 0 be an exact sequence of R-modules. Prove that

1) depth_{I}(N) = depth_{I}(M) if depth_{I}(R) = depth_{I}(M), and 2) depth_{I}(N) = depth_{I}(M) + 1 if depth_{I}(R) > depth_{I}(M). Hint: If depth_{I}(M) > 0, then choose x ∈ I which is a non-zerodivisor for both R and M. Construct the commutative diagram

0 ⟶ N  ⟶  R^{r}  ⟶  M  ⟶ 0
↓^{μ_{x}}  ↓^{μ_{x}}  ↓^{μ_{x}}
0 ⟶ N  ⟶  R^{r}  ⟶  M  ⟶ 0
↓  ↓  ↓
N/xN  R^{r}/xR^{r}  M/xM
↓  ↓  ↓
0  0  0

notice that depth_{I}(M/xM) = depth_{I}(M) − 1, and continue.

g) Let ⋯ F_{2} ⟶^{φ_{2}} F_{1} ⟶^{φ_{1}} F_{0} ⟶^{φ_{0}} R/I ⟶ 0 be a finite free resolution of R/I, i.e. an exact sequence of R-modules such that F_{0}, F_{1}, F_{2}, … are finitely generated free R-modules, and let φ_{i}^{∗} = Hom_{R}(φ_{i}, M) for i ≥ 0. Show that the sequence

0 ⟶ Hom_{R}(R/I, M) ⟶^{φ_{0}^{∗}} Hom_{R}(F_{0}, M) ⟶^{φ_{1}^{∗}} Hom_{R}(F_{1}, M) ⟶^{φ_{2}^{∗}} ⋯

is a complex, i.e. that Im(φ_{i}^{∗}) ⊆ Ker(φ_{i+1}^{∗}) for i ≥ 0.

h) In the situation of g), let N_{i} = Ker(φ_{i}) for i ≥ 0. For i ≥ 0, the cokernel of the map Hom_{R}(F_{i}, M) ⟶ Hom_{R}(N_{i}, M) is called the (i + 1)^{st} Ext-module of R/I with values in M, and is denoted by Ext_{R}^{i+1}(R/I, M). Prove that Ext_{R}^{i+1}(R/I, M) ≠ 0 if and only if we have Im(φ_{i}^{∗}) ≠ Ker(φ_{i+1}^{∗}) in g).

i) (This part requires some knowledge of homological algebra.) For d ≥ 1, prove that depth_{I}(M) = d if and only if Ext_{R}^{i}(R/I, M) = 0 for 0 ≤ i < d and Ext_{R}^{d}(R/I, M) ≠ 0. (Here we let Ext_{R}^{0}(R/I, M) = Hom_{R}(R/I, M).) Hint: Use induction on d. Choose a non-zerodivisor x for M and apply Hom_{R}(—, M) to the exact sequence 0 ⟶ M ⟶^{μ_{x}} M ⟶ M/xM ⟶ 0.

j) Now let R = K[x_{1}, …, x_{n}] and M = R^{r}/⟨g_{1}, …, g_{s}⟩ again. Using i), develop an algorithm for the computation of depth_{I}(M). Implement your algorithm in a CoCoA function Depth(…). Hint: Using Proposition 3.3.13.a, show that the map φ_{i}^{∗} is induced by the map whose associated matrix is A_{φ_{i}} ⊗ I_{r} under the representation of Hom_{R}(F_{i}, M) given by Theorem 3.3.15.b. Then show how one can find a presentation of Ker(φ_{i+1}^{∗})/ Im(φ_{i}^{∗}) with the aid of Corollary 3.2.6.

k) Apply your CoCoA function Depth(…) in the following cases. 1) I = (x, y, z) and M = (xy − z, yz − x, xz − y) in ℚ[x, y, z]

2) I = (x_{1}, x_{2}, x_{3}, x_{4}) and M = (x_{2}x_{3} − x_{1}x_{4}, x_{2}^{3} − x_{1}^{2}x_{3}, x_{1}x_{3}^{2} − x_{2}^{2}x_{4}, x_{3}^{3} − x_{2}x_{4}^{2}) in ℚ[x_{1}, x_{2}, x_{3}, x_{4}]

3) I = (x, 5y − 3, 5z − 4) and M = ⟨(x, y, z)⟩ in ℚ[x, y, z]^{3}

3.4 Elimination

Eliminate, eliminate, eliminate.

Eliminate the eliminators of elimination theory. (Shreeram S. Abhyankar)

So far in this chapter we have solved all problems by computing syzygies. Another common feature of our approach has been that it didn’t matter which module term ordering we chose to compute the Gröbner bases we needed. Starting from now, we have to eliminate this freedom in order to gather the additional power we need for tackling other kinds of applications of Computational Commutative Algebra.

For instance, given an ideal I in a polynomial ring P = K[x_{1}, …, x_{n}] over a field K and a number j ∈ {1, …, n − 1}, we can consider the set of all polynomials in I which involve only the indeterminates x_{1}, …, x_{j}. This set I ∩ K[x_{1}, …, x_{j}] is clearly an ideal in K[x_{1}, …, x_{j}]. It is called the elimination ideal of I with respect to the indeterminates {x_{j+1}, …, x_{n}}, because passing from I to this ideal means eliminating all polynomials in which one of these latter indeterminates occurs. Now the key observation is that, for solving the problem of computing elimination ideals, we need to compute the Gröbner basis of I with respect to special term orderings called elimination orderings.

But why couldn’t we eliminate the elimination problem instead? Let us show you a couple of examples where elimination appears naturally. Suppose we have a hunch that there could exist a formula which expresses the area s of a triangle in terms of the three side lengths a, b, and c. We choose a system of coordinates in the plane such that the situation looks as follows.

._{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.} _{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}  x y  (a, 0) (x, y) a  b c_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}_{.}_{.}

By Pythagoras’s Theorem, we have b^{2} = (a − x)^{2} + y^{2} and c^{2} = x^{2} + y^{2} . Furthermore, we observe that 2s = ay. Then we construct the polynomial ideal I = (b^{2}−(a−x)^{2}−y^{2}, c^{2}−x^{2}−y^{2}, 2s−ay) in the ring K[x, y, a, b, c, s]. The desired formula should be a polynomial relation among the indeterminates a, b, c, s. It should arise as a consequence of the algebraic relations coded in the ideal I. Thus it should be contained in I ∩ K[a, b, c, s]. Indeed, when we compute the elimination ideal I ∩ K[a, b, c, s], we find just one generator which corresponds to Heron’s Formula

s^{2} = \frac{1}{16}(a + b + c)(a + b − c)(a − b + c)(−a + b + c)

In the second example we consider the set of all points (x, y, z) ∈ 𝔸_{ℚ}^{3} such that

x = t^{3}, y = t^{4}, z = t^{5}  for some t ∈ ℚ

This set of points is an affine variety. In the language of algebraic geometry, it is called a parametrically defined space curve. If we want an ideal I in ℚ[x, y, z] such that this space curve equals Z_{ℚ}(I), we have to form the larger ideal J = (x−t^{3}, y−t^{4}, z−t^{5}) in ℚ[x, y, z, t] and to eliminate t. The resulting ideal I = J ∩ ℚ[x, y, z] = (x^{3} − yz, y^{2} − xz, x^{2}y − z^{2}) has the space curve as its zero set.

The remainder of this chapter will consist almost entirely of applications of elimination. This goes a long way to show how important it is. The current section provides the basis for those applications. Namely, we show how to compute generators of an elimination module of a P -submodule M ⊆ P^{r}, i.e. of a P -module of the form M ∩ K[x_{i} | x_{i} ∉ L]^{r}, where L is a subset of the set of indeterminates {x_{1}, …, x_{n}} (see Theorem 3.4.5).

Then we provide the reader with an additional technique for effectively performing the elementary operations on ideals and modules discussed earlier (see Proposition 3.4.6 and Proposition 3.4.9). This technique, sometimes also known as the method of tag variables, will later help us solve a variety of other problems. The geometric interpretation of elimination is that we want to project objects which are in big spaces into smaller spaces. A discussion of this geometric point of view will be suggested in Tutorial 39.

In the following we let K be a field, P = K[x_{1}, …, x_{n}] a polynomial ring , r ≥ 1, and M ⊆ P^{r} a P -submodule. Moreover, let L ⊆ {x_{1}, …, x_{n}} be a subset of the set of indeterminates, and let P̂ = K[x_{i} | x_{i} ∉ L] be the polynomial ring in the remaining indeterminates.

Definition 3.4.1. Let L ⊆ {x_{1}, …, x_{n}} be a subset of the set of indeterminates as above.

a) A module term ordering σ on 𝕋^{n}⟨e_{1}, …, e_{r}⟩ is called an elimination ordering for L if every element m ∈ P^{r} \ {0} such that LT_{σ}(m) ∈ P̂ ^{r} is contained in P̂ ^{r}.

b) Given a P -submodule M of P^{r}, the P̂-submodule M ∩ P̂ ^{r} of P̂ ^{r} is called the elimination module of M with respect to L.

In other words, an elimination ordering for L has the property that if the indeterminates in L do not occur in the leading term of an element, they do not occur in the element at all. In Section 1.4, we have already defined some kind of elimination orderings. In fact, they are a special case of elimination orderings in the sense of the above definition.

Example 3.4.2. Let r = 1 and L = {x_{1}, …, x_{j}} for j ∈ {1, …, n − 1}. Then the elimination ordering Elim(L) defined in Example 1.4.10 is an elimination ordering for L in the sense of Definition 3.4.1.a. Namely, let f ∈ P \{0} be a polynomial whose leading term satisfies LT_{Elim(L)}(f) ∈ K[x_{j+1}, …, x_{n}]. If we write LT_{Elim(L)}(f) = x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}, and if t = x_{1}^{β_{1}} ⋯ x_{n}^{β_{n}} is any term in Supp(f), then the definition of Elim(L) implies 0 = α_{1} + ⋯ + α_{j} ≥ β_{1} + ⋯ + β_{j}. Thus we obtain β_{1} = ⋯ = β_{j} = 0, i.e. t ∈ K[x_{j+1}, …, x_{n}]. Since t ∈ Supp(f) was arbitrary, we find f ∈ K[x_{j+1}, …, x_{n}] as desired.

For module term orderings on 𝕋^{n}⟨e_{1}, …, e_{r}⟩ with r ≥ 2, examples of elimination orderings can be obtained as follows.

Example 3.4.3. Let 1 ≤ j ≤ n − 1, and let L = {x_{1}, …, x_{j}}. Then the module term ordering LexPos on 𝕋^{n}⟨e_{1}, …, e_{r}⟩ is an elimination ordering for L. To check this, we suppose a vector m ∈ P^{r} \ {0} has a leading term such that LT_{LexPos}(m) ∈ K[x_{j+1}, …, x_{n}]^{r}. We write LT_{LexPos}(m) = te_{γ}, where t ∈ 𝕋^{n} and 1 ≤ γ ≤ r. Let t′e_{γ′} be an element of Supp(m), where t′ ∈ 𝕋^{n} and 1 ≤ γ′ ≤ r. By definition of LexPos, we have t ≥_{Lex} t′. Since the term t does not involve x_{1}, …, x_{j}, we get t′ ∈ K[x_{j+1}, …, x_{n}]. Thus we have m ∈ K[x_{j+1}, …, x_{n}]^{r}, as we needed to show.

In particular, given j ∈ {1, …, n − 1}, this example shows that the lexicographic term ordering on 𝕋^{n} is an elimination ordering for the first j indeterminates (see also Proposition 1.5.10). Other kinds of elimination orderings on 𝕋^{n}⟨e_{1}, …, e_{r}⟩ will be studied in Tutorial 34.

Our first goal in this section is to learn how to compute elimination modules. The following preparatory result generalizes Proposition 1.4.13.

Proposition 3.4.4. Let σ be a module ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩. Moreover, we let 𝕋̂⟨e_{1}, …, e_{r}⟩ be the set of terms involving only the indeterminates {x_{i} | x_{i} ∉ L}.

a) The restriction σ̂ of σ to 𝕋̂⟨e_{1}, ..., e_{r}⟩ is a module ordering.

b) If σ is a module term ordering, then also σ̂ is a module term ordering.

Proof. The case L = {x_{i}} is a straightforward generalization of Proposition 1.4.13 to 𝕋^{n}⟨e_{1}, …, e_{r}⟩. The general case follows by repeated application of this result. □

After we have computed the Gröbner basis of M with respect to an elimination ordering σ on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, it is easy to read off a system of generators for the corresponding elimination module. This is the essence of the following theorem which is the main result of the current section and lies at the heart of many applications of Computational Commutative Algebra.

Theorem 3.4.5. (Computation of Elimination Modules) Let M be a P -submodule of P^{r}, let L ⊆ {x_{1}, …, x_{n}} be a subset of the set of indeterminates, and let σ be an elimination ordering for L. Furthermore, consider the polynomial subring P̂ = K[x_{i} | x_{i} ∉ L] of P as well as the restriction σ̂ of σ to the set of terms 𝕋̂⟨e_{1}, …, e_{r}⟩ in P̂ ^{r}. a) We have LTσ̂(M ∩ P̂ ^{r}) = LT_{σ}(M) ∩ P̂ ^{r}.

b) Let G be a σ -Gröbner basis of M, and let Ĝ be the set of all elements of G which are contained in P̂ ^{r}. Then the set Ĝ is a σ̂ -Gröbner basis of M ∩ P̂ ^{r}.

c) Let G be the reduced σ -Gröbner basis of M. Then Ĝ = G ∩ P̂ ^{r} is the reduced σ̂ -Gröbner basis of M ∩ P̂ ^{r}.

Proof. In a), only the inclusion “⊇” needs to be shown. Let G = {g_{1}, …, g_{s}} be a σ -Gröbner basis of M. If we have te_{i} ∈ LT_{σ}(M) for some term t ∈ P̂ and some i ∈ {1, …, r}, then there exists a term t′ ∈ 𝕋^{n} and a number j ∈ {1, …, s} such that te_{i} = t′ LT_{σ}(g_{j}). Since t ∈ P̂, we also have t′ ∈ P̂ and LT_{σ}(g_{j}) ∈ P̂ ^{r}. From the fact that σ is an elimination ordering for L, we can then conclude g_{j} ∈ P̂ ^{r}, and hence t′g_{j} ∈ P̂ ^{r}. Thus the claim follows from te_{i} = t′ LTσ̂(g_{j}) = LTσ̂(t′g_{j}) ∈ LTσ̂(M ∩P̂ ^{r}). Claim b) is an immediate consequence of a), and c) follows from b). □

Notice that we allow M = ⟨0⟩ in this theorem. In this case we have LT_{σ}(M) = ⟨0⟩ by definition, G = ∅ is a σ -Gröbner basis of M, and Ĝ = ∅ is a σ -Gröbner basis of M ∩ P̂ ^{r} = ⟨0⟩.

As we indicated above, the preceding theorem has a number of important applications which will be explored in the remainder of this chapter. We begin by describing alternative ways to perform the elementary operations on modules discussed in the previous sections. The next proposition shows how one can compute the intersection of two submodules of P^{r} using elimination.

Proposition 3.4.6. Let M and N be two submodules of P^{r}, let {g_{1}, …, g_{s}} be a system of generators of M, and let {h_{1}, …, h_{t}} be a system of generators of N. We choose a new indeterminate y and consider the P [y]-submodule

U = ⟨yg_{1}, …, yg_{s}, (1 − y)h_{1}, …, (1 − y)h_{t}⟩

of P [y]^{r}. Then we have M ∩ N = U ∩ P^{r}.

Proof. For v ∈ M ∩ N, there are polynomials p_{1}, …, p_{s}, q_{1}, …, q_{t} ∈ P such that we have v = ∑_{i=1}^{s} p_{i}g_{i} = ∑_{j=1}^{t} q_{j}h_{j}. From this we get

v = yv+(1−y)v = p_{1}yg_{1}+⋯+p_{s}yg_{s}+q_{1}(1−y)h_{1}+⋯+q_{t}(1−y)h_{t} ∈ U ∩P^{r}

Conversely, suppose we are given a vector v ∈ U ∩ P^{r}. By definition of U, there exist polynomials p_{1}, …, p_{s}, q_{1}, …, q_{t} ∈ P [y] such that we have v = ∑_{i=1}^{s} p_{i}yg_{i} + ∑_{j=1}^{t} q_{j}(1 − y)h_{j}. Since v ∈ P^{r}, the element v is invariant under the substitution y ↦ 0, i.e. we have v = ∑_{i=1}^{t} q(x_{1}, …, x_{n}, 0)h_{i} ∈ N. Similarly, the element v is invariant under the substitution y ↦ 1, i.e. we have v = ∑_{i=1}^{s} p_{i}(x_{1}, …, x_{n}, 1)g_{i} ∈ M. Altogether, we get v ∈ M ∩ N. □

Example 3.4.7. Let us redo the computation of the intersection of (x_{1}, x_{2}) and (x_{1}^{2} − x_{2}^{2}, x_{1}x_{2}x_{3}, x_{3}^{2} − x_{1}) in P = K[x_{1}, x_{2}, x_{3}] mentioned in Example 3.2.4. In the polynomial ring P [y] = K[x_{1}, x_{2}, x_{3}, y], we consider the ideal U = ((1 − y)x_{1}, (1 − y)x_{2}, y(x_{1}^{2} − x_{2}^{2}), y(x_{1}x_{2}x_{3}), y(x_{3}^{2} − x_{1})). The reduced Gröbner basis of this ideal with respect to Elim(y) is given by {x_{1}^{2} − x_{2}^{2}, x_{2}x_{3}^{2} − x_{1}x_{2}, x_{1}x_{3}^{2} − x_{2}^{2}, x_{1}x_{2}x_{3}, x_{2}^{3}, x_{2}y − x_{2}, x_{1}y − x_{1}, x_{3}^{2}y − x_{1}}.

Since x_{2}^{3} = x_{3}(x_{1}x_{2}x_{3})−x_{2}(x_{1}x_{3}^{2}−x_{2}^{2}), we can disregard the generator x_{2}^{3} , and the ideal U ∩ P equals (x_{1}^{2} − x_{2}^{2}, x_{2}x_{3}^{2} − x_{1}x_{2}, x_{1}x_{3}^{2} − x_{2}^{2}, x_{1}x_{2}x_{3}), in agreement with the result obtained in Example 3.2.4.

A similar method can be used to compute the intersection of ℓ submodules M_{1}, …, M_{ℓ} of P^{r} simultaneously. In the case ℓ = 2, it yields an alternative to the method explained in Proposition 3.4.6.

Proposition 3.4.8. Let ℓ ≥ 2, and for every i ∈ {1, …, ℓ} let M_{i} be a P -submodule of P^{r} which is generated by a set of vectors {g_{i1}, …, g_{is_{i}}}. We choose new indeterminates y_{1}, …, y_{ℓ} and consider the P [y_{1}, …, y_{ℓ}]-sub-module U of P [y_{1}, …, y_{ℓ}]^{r} generated by

{y_{i}g_{ij} | 1 ≤ i ≤ ℓ, 1 ≤ j ≤ s_{i}} ∪ {(1 − y_{1} − ⋯ − y_{ℓ})e_{i} | 1 ≤ i ≤ r}

Then we have M_{1} ∩ ⋯ ∩ M_{ℓ} = U ∩ P^{r}.

Proof. Let v ∈ M_{1} ∩ ⋯ ∩ M_{ℓ}. For i = 1, …, ℓ, we choose f_{i1}, …, f_{is_{i}} ∈ P such that v = f_{i1}g_{i1} + ⋯ + f_{is_{i}}g_{is_{i}}. Then we have

v = y_{1}v + ⋯ + y_{ℓ}v + (1 − y_{1} − ⋯ − y_{ℓ})v
= ∑_{i=1}^{ℓ} ∑_{j=1}^{s_{i}} f_{ij}y_{i}g_{ij} + (1 − y_{1} − ⋯ − y_{ℓ})v ∈ U ∩ P^{r}

Conversely, given a vector v ∈ U ∩ P^{r}, we can write it in the form v = ∑_{i=1}^{ℓ} ∑_{j=1}^{s_{i}} f_{ij}y_{i}g_{ij} + ∑_{k=1}^{r} h_{k}(1 − y_{1} − ⋯ − y_{ℓ})e_{k} with polynomials f_{ij}, h_{k} ∈ P [y_{1}, …, y_{ℓ}]. Let i ∈ {1, …, ℓ}. Since v ∈ P^{r}, this vector is invariant under the substitution y_{j} ↦ δ_{ij} for j = 1, …, ℓ, where δ_{ij} = 0 for j ≠ i and δ_{ii} = 1. Therefore we get v = ∑_{j=1}^{s_{i}} f_{ij}(x_{1}, …, x_{n}, δ_{i1}, …, δ_{iℓ})g_{ij} ∈ M_{i} for i = 1, …, ℓ. □

Finally, we indicate how one can use elimination to compute colon modules. A similar method can be used to find the annihilator of a module (see Exercise 11). Given a P -submodule M ⊆ P^{r} and a new indeterminate y, we denote the P [y]-submodule of P [y]^{r} generated by the elements of M by MP [y].

Proposition 3.4.9. Let M and N be submodules of P^{r}, let {g_{1}, …, g_{s}} be a system of generators of M, and let {h_{1}, …, h_{t}} be a system of generators of N. a) Given a polynomial f ∈ P, we choose a new indeterminate y and

let U be the P [y]-submodule of P [y]^{r} generated by the set of polynomials {fyg_{1}, …, fyg_{s}, (1 − y)h_{1}, …, (1 − y)h_{t}}. Furthermore, we let {v_{1}, …, v_{u}} be a system of generators of the elimination module U ∩ P^{r}. For i = 1, …, u, we may write v_{i} = fw_{i} for some w_{i} ∈ M. Then we have

N :_{M} (f) = ⟨w_{1}, …, w_{u}⟩

b) Given an ideal I = (f_{1}, …, f_{ℓ}) in P, we choose a new indeterminate y and consider the polynomial f(y) = f_{1} +f_{2}y +⋯+f_{ℓ}y^{ℓ−1} in P [y]. Then we have

N :_{M} I = (NP [y] :_{MP [y]} (f(y))) ∩ P^{r}

Proof. The first claim follows by combining Lemma 3.2.20 and Proposition 3.4.6. Now we prove claim b). For a vector v ∈ M satisfying f_{i}v ∈ N for i = 1, …, ℓ, we obviously have f(y) v = (f_{1} + ⋯ + f_{ℓ}y^{ℓ−1})v ∈ NP [y].

Conversely, let v ∈ MP [y] ∩ P^{r} be such that f(y) v ∈ NP [y]. Since, clearly, MP [y] ∩ P^{r} = M, we actually have v ∈ M. We consider P [y] as a polynomial ring in one indeterminate y over the ring P and equip it with the standard grading deg(y) = 1. Then NP [y] is a graded submodule of P [y]^{r}, because it is generated by homogeneous elements of degree zero (see Proposition 1.7.10). Thus (f_{1} + ⋯ + f_{ℓ}y^{ℓ−1})v ∈ NP [y] implies f_{i}y^{i−1}v ∈ NP [y] for i = 1, …, ℓ. Next we write f_{i}y^{i−1}v as an explicit P [y]-linear combination of the generators {h_{1}, …, h_{t}} of NP [y] and perform the substitution y ↦ 1. We obtain f_{i}v ∈ N for i = 1, …, ℓ. Therefore we have v ∈ N :_{M} I. □

Example 3.4.10. In Example 3.2.16 we computed the colon ideal I :_{P} J in the ring ℚ[x_{1}, x_{2}, x_{3}], where I = (x_{2}^{3}−x_{2}^{2}x_{3}−x_{1}x_{2}+x_{1}x_{3}, x_{1}x_{2}^{2}x_{3}+x_{2}^{2}x_{3}^{2}−x_{1}^{3}+ x_{1}x_{2}^{2} − x_{1}^{2}x_{3} + x_{2}^{2}x_{3} − x_{1}x_{3}^{2} − x_{1}^{2}, x_{2}^{2}x_{3}^{3} − x_{1}^{2}x_{2}x_{3} − x_{1}x_{3}^{3} + x_{1}^{3} − x_{2}^{2}x_{3} + x_{2}x_{3}^{2}) and J = (x_{2} − x_{3}, x_{1}^{2} − x_{3}). Let us redo this computation with our new technique. We consider the ring P [y] = K[x_{1}, x_{2}, x_{3}, y] and form the ideal IP [y] and the polynomial f(y) = (x_{2} − x_{3}) + (x_{1}^{2} − x_{3})y. Then we compute IP [y] :_{P [y]} (f(y)) using CoCoA and get a number of polynomials which are already contained in P and generate I.

In the following example we show a subtle feature of Proposition 3.4.9.b. Namely, we show that the inclusion (N :_{M} I)P [y] ⊆ NP [y] :_{MP [y]} (f(y)) can be strict even in the case where M = P^{r}. This contradicts a claim in [Ei95], Exercise 15.41.b.

Example 3.4.11. Over the polynomial ring P = ℤ/(101)[x_{1}, x_{2}, x_{3}, x_{4}], we consider the ideals J = (x_{1}x_{3}, x_{2}x_{4}, x_{1}x_{4}+x_{2}x_{3}) and I = (x_{3}, x_{4}). We claim that (J :_{P} I)P [y] ⊂ JP [y] :_{P [y]} (x_{3} + x_{4}y). If we compute J :_{P} I with one of the above methods, we get J :_{P} I = (x_{1}x_{2}, x_{1}^{2}, x_{1}x_{3}, x_{1}x_{4}, x_{2}^{2}, x_{2}x_{3}, x_{2}x_{4}). On the other hand, JP [y] :_{P [y]} (x_{3} + x_{4}y) = (x_{1}x_{2}, x_{1}^{2}, x_{1}x_{3}, x_{1}x_{4}, x_{2}^{2}, x_{2}x_{3}, x_{2}x_{4}, x_{2}y + x_{1}). Clearly, the polynomial x_{2}y + x_{1} is not contained in the ideal (J :_{P} I)P [y].

Exercise 1. Consider the polynomial ring P = K[x, y] over a field K. Prove that the only elimination ordering for L = {x} is Lex.

Exercise 2. Consider the polynomial ring P = K[x, y, z] over a field K. Describe at least two different elimination orderings for L = {z}.

Exercise 3. Let {x_{1}, …, x_{n}} be a set of indeterminates, and let L ⊆ {x_{1}, …, x_{n}}. Find a matrix V ∈ Mat_{n}(ℤ) such that Ord(V) is an elimination ordering for L on 𝕋^{n}.

Exercise 4. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K and I = (f) a principal ideal in P generated by a polynomial f ∈ P \{0}. Moreover, let L ⊆ {x_{1}, …, x_{n}}, and let P̂ = K[x_{i} | x_{i} ∉ L]. Show that we have I ∩ P̂ = (0) if and only if f ∉ P̂.

Exercise 5. Let K be a field, let P = K[x_{1}, …, x_{n}], let t_{1}, …, t_{s} ∈ 𝕋^{n} be terms such that t_{1} >_{Lex} t_{2} >_{Lex} ⋯ >_{Lex} t_{s}, and let I be the ideal in P generated by {t_{1}, …, t_{s}}. Prove that we have I ∩ K[x_{n}] = (0) if and only if t_{s} ∉ K[x_{n}].

Exercise 6. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, and let M be the P -submodule of P^{n} generated by {g_{1}, …, g_{n}}, where g_{1} = (x_{1}, x_{2}, …, x_{n}), where g_{2} = (x_{n}, x_{1}, …, x_{n−1}), …, and where g_{n} = (x_{2}, x_{3}, …, x_{n}, x_{1}). Show that M ∩ K[x_{2}, …, x_{n}]^{n} = (0).

Exercise 7. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let L ⊆ {x_{1}, …, x_{n}}, and let P̂ = K[x_{i} | x_{i} ∉ L]. Furthermore, let I = (f_{1}, …, f_{r}) be an ideal in P , and let A be the affine K -algebra P/I. Finally, let B be a residue class ring of P̂ such that the inclusion P̂ ⊆ P induces an injective K -algebra homomorphism φ : B ⟶ A.

P̂ ⟶ P
↓  ↓
B ⟶ A = P/I

Explain how one can compute a set of generators of an ideal J in P̂ such that B is isomorphic to P̂/J.

Exercise 8. Let I be an ideal in a polynomial ring P = K[x, y_{1}, …, y_{n}] over a field K, and assume that I ∩ K[x] ≠ (0). Let σ be an elimination ordering for {y_{1}, …, y_{n}}, and let G be the reduced σ -Gröbner basis of I.

a) Show that G ∩ K[x] consists of a single polynomial, say f.

b) Prove that if I is a prime ideal, then f is irreducible.

Exercise 9. Use CoCoA to prove Heron’s Formula.

Exercise 10. Use CoCoA to find the equations vanishing at the following parametrically defined curves.

a) {(t^{3}, t^{4}, t^{5}) | t ∈ ℚ}

b) {(t, t^{2}, t^{3}) | t ∈ ℚ} (This is called the twisted cubic curve.)

c) \{( \frac{3t}{t^{3}+1} , \frac{3t^{2}}{t^{3}+1} ) | t ∈ ℚ\} (This is called the folium of Descartes.)

Exercise 11. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let r ≥ 1, let M be a P -submodule of P^{r}, let {g_{1}, …, g_{s}} ⊆ P^{r} be a system of generators of M, and let v ∈ P^{r}. We choose a new indeterminate y and consider the P [y]-submodule U = ⟨yg_{1}, …, yg_{s}, (1 − y)v⟩ of P [y]^{r}. Show that every element of a system of generators {h_{1}, …, h_{t}} of the elimination module U ∩ P^{r} is of the form h_{i} = f_{i}v with f_{i} ∈ P for i = 1, …, t, and that the annihilator of the cyclic submodule ⟨v + M⟩ of P^{r}/M is the ideal (f_{1}, …, f_{t}).

Tutorial 34: Elimination of Module Components

In this section we studied module term orderings which had the property that if the leading term of an element did not involve certain indeterminates, then the whole element did not contain those indeterminates. Suppose we could consider also the canonical basis vectors e_{1}, …, e_{r} as “indeterminates”. Then we could define a different kind of elimination ordering, namely one having the property that if the leading term of an element does not involve certain e_{i}, then the whole element does not contain a multiple of one of those e_{i} in its support.

More precisely, we introduce the following notion. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let r ≥ 1, and let M ⊆ P^{r} be a P -submodule which is generated by a tuple G = (g_{1}, …, g_{s}) of vectors in P^{r}. Moreover, let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}⟩, and let L ⊆ {1, …, r}. The module term ordering σ is called a component elimination ordering for L if every element m ∈ P^{r} \ {0} such that LT_{σ}(m) ∈ ⨁_{i∈{1,...,r}\L} P e_{i} is contained in ⨁_{i∈{1,...,r}\L} P e_{i}. The module M ∩ ⨁_{i∈{1,...,r}\L} P e_{i} is called the component elimination module of M with respect to L.

In this tutorial we want to study component elimination orderings and show some of their applications. In particular, we shall see that they allow us to compute various operations in yet another way. For practical purposes, the methods explained here tend to be among the most efficient ones.

a) Let To be a term ordering on 𝕋^{n}, let i ∈ {1, …, r}, and let L be the set {1, …, i}. Show that the module term ordering PosTo on 𝕋^{n}⟨e_{1}, …, e_{r}⟩ (see Example 1.4.16.b) is a component elimination ordering for L.

b) State and prove a result for the restriction of σ to 𝕋^{n}⟨e_{i} | i ∉ L⟩ which is analogous to Proposition 3.4.4.

c) Prove the following version of Theorem 3.4.5 for component elimination orderings. Let P̂^{r} = ⨁_{i∈{1,...,r}\L} P e_{i}, and let σ̂ be the restriction of σ to the

monomodule of terms in P̂^{r}.

a) We have LTσ̂(M ∩ P̂^{r}) = LT_{σ}(M) ∩ P̂^{r}. b) For a σ -Gröbner basis G of M, the set Ĝ = G∩P̂^{r} is a σ̂ -Gröbner

basis of the component elimination module M ∩ P̂^{r}. Hint: Use the canonical basis vectors e_{1}, …, e_{r} as indeterminates (see Exercise 10 in Section 1.4).

c) Consider the following block matrix of size (r + s) × s.

U = ( \begin{matrix}G \\ I_{s} \end{matrix} )

Let U be the P -submodule of P^{r+s} generated by the columns of U, let L = {1, …, r}, and let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}, e_{r+1}, …, e_{r+s}⟩ which is a component elimination ordering for L. Show that

U ∩ ( ⨁_{i=r+1}^{r+s}P e_{i}) ≅ Syz_{P} (G)

Hint: Consider a σ -Gröbner basis of U. Show that one can read off a σ -Gröbner basis of M and a σ -Gröbner basis of Syz_{P} (G).

d) Write a CoCoA function CompElimSyz(…) which takes the tuple G and uses the preceding method to compute a system of generators of the module Syz_{P} (G). Apply your function to compute Gröbner bases of the syzygy modules of the following tuples with respect to PosDegRevLex

and PosLex.

1) G = (x^{2}, xy + y^{2}) in ℚ[x, y]^{2}

2) G = ((x^{2}, x − y), (0, y), (xy, z)) in (ℚ[x, y, z]^{2})^{3}

3) G = ((xy + y, x), (x − y, y), (x, x + y), (−x, y)) in (ℚ[x, y]^{2})^{4}

e) Let N be another P -submodule of P^{r}, and let H = (h_{1}, …, h_{t}) be a tuple of vectors which generate N. Consider the following block matrix of size 2r × (s + t).

V = ( \begin{matrix}G & H \\ 0 & H \end{matrix} )

Let V be the P -submodule of P^{2r} generated by the columns of V, let L = {1, …, r}, and let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{2r}⟩ which is a component elimination ordering for L. Show that

V ∩ ( ⨁_{i=r+1}^{2r}P e_{i}) ≅ M ∩ N

Hint: Consider a σ -Gröbner basis of V . Show that one can read off a σ -Gröbner basis of M + N and a σ -Gröbner basis of M ∩ N.

f) Implement a CoCoA function CompElimIntersection(…) which takes tuples G and H generating P -submodules M and N of P^{r} and uses the preceding method to compute a system of generators of the intersection module M ∩ N. Apply your function to compute the Gröbner bases of the intersection modules asked for in Tutorial 30.b with respect to

PosDegRevLex and PosLex.

g) Given a vector v ∈ P^{r}, consider the following block matrix W of size (r + 1) × (s + 1).

W = ( \begin{matrix}G & v \\ 0 & 1 \end{matrix} )

Let W be the P -submodule of P^{r+1} generated by the columns of W, let L be the set {1, …, r}, and let σ be a module term ordering on 𝕋^{n}⟨e_{1}, …, e_{r}, e_{r+1}⟩ which is a component elimination ordering for L. Show that

W ∩ P e_{r+1} ≅ M :_{P} ⟨v⟩

Hint: Consider a σ -Gröbner basis of W. Show that one can read off a σ -Gröbner basis of M + ⟨v⟩ and a σ -Gröbner basis of M :_{P} ⟨v⟩.

h) Write a CoCoA function CompElimColon(…) which takes the tuple G and a vector v ∈ P^{r} and uses the preceding method to compute a system of generators of the colon ideal M :_{P} ⟨v⟩. Apply your function to compute Gröbner bases with respect to PosDegRevLex and PosLex of the colon ideals corresponding to the following cases (see Tutorial 31.d).

1) G is a system of generators of the ideal (x − 1, y − 1, z − 1)^{5} and v = (x + y + z − 3)^{3} in ℚ[x, y, z]

2) G is a system of generators of the ideal (x−1, y −1, z −1)^{2} ∩(x, y, z) and v = x in ℚ[x, y, z]

3) G = ((x, y), (y, x)) and v = (x^{2}, y^{2}) in ℚ[x, y]^{2}

Tutorial 35: Projective Spaces and Graßmannians

In algebraic geometry, frequently a certain set of objects corresponds oneto-one to the set of points of another object. Some of the most important examples for this phenomenon will be introduced in this tutorial.

Let K be a field and V be a non-zero finite-dimensional K -vector space. For v, v′ ∈ V \ {0}, we let v ∼ v′ if and only if there exists an element λ ∈ K \ {0} such that v = λv′. It is easy to check that the relation ∼ is an equivalence relation. The set (V \ {0})/ ∼ of its equivalence classes will be called the projective space associated to V and will be denoted by ℙ(V).

In the special case V = K^{n+1} , we shall also say that ℙ(V) is called the n-dimensional projective space over K, and we shall denote it by ℙ_{K}^{n}. The equivalence class of an element in V is called a point in ℙ(V). If (p_{0}, …, p_{n+1}) ∈ K^{n+1} \ {0}, then the point of ℙ_{K}^{n} defined by its equivalence class will be denoted by (p_{0} : …: p_{n}).

The set of equivalence classes of the non-zero elements of a 2-dimensional vector subspace of V will be called a line in ℙ(V), and the set of equivalence classes of non-zero elements of an (dim(V) − 1)-dimensional vector subspace of V will be called a hyperplane in ℙ(V). a) Show that there is a bijection between ℙ(V) and the set of 1-dimensional

K -vector subspaces of V .

b) For every hyperplane H ⊆ ℙ_{K}^{n}, find a tuple (a_{0}, …, a_{n}) ∈ K^{n+1} \ {0} such that H is the set of all points (p_{0} : …: p_{n}) ∈ ℙ_{K}^{n} which satisfy a_{0}p_{0} + ⋯ + a_{n}p_{n} = 0. (First note that this condition is well-defined.) Moreover, prove that two tuples (a_{0}, …, a_{n}) and (b_{0}, …, b_{n}) give rise to the same hyperplane H ⊆ ℙ_{K}^{n} in this way if and only if there exists an element λ ∈ K \ {0} such that (a_{0}, …, a_{n}) = λ · (b_{0}, …, b_{n}).

c) Prove that any two distinct lines in ℙ_{K}^{2} meet at a unique point.

d) Let Hyp(ℙ_{K}^{n}) be the set of all hyperplanes of ℙ_{K}^{n}. Show that one can define a map η : Hyp(ℙ_{K}^{n}) ⟶ ℙ_{K}^{n} by using b) to map H to the point (a_{0} : …: a_{n}). Prove that the map η is bijective. Thus we can view the set Hyp(ℙ_{K}^{n}) as an n-dimensional projective space over K. It is called the dual projective space and sometimes denoted by (ℙ_{K}^{n})ˇ .

e) Show that the set of all elements of (ℙ_{K}^{n})ˇ which correspond to hyperplanes passing through the point (0 : …: 0 : 1) is a hyperplane in (ℙ_{K}^{n})ˇ .

f) Let p be a prime number and K = 𝔽_{p}. Write a CoCoA function Hyperplanes(…) which takes a point (p_{0} : …: p_{n}) ∈ ℙ_{K}^{n} and computes the list of all tuples (a_{0}, …, a_{n}) ∈ K^{n+1} which correspond to the hyperplanes passing through the point.

g) Use your CoCoA function Hyperplanes(…) to compute the lines passing through each of the following points P ∈ ℙ_{K}^{2} , where K = 𝔽_{3} .

1) P = (0 : 0 : 1)

2) P = (0 : 1 : 1)

3) P = (1 : 1 : 1) After having seen that the set of 1-dimensional K -vector subspaces

of K^{n+1} can be identified with the set of points of the n-dimensional projective space over K, we now turn our attention to the set of (m+1)-dimensional K -vector subspaces of K^{n+1} , where 1 ≤ m < n. We start with the first nontrivial case m = 1 and n = 3.

h) Explain how one can identify the set of all 2-dimensional K -vector subspaces of K^{4} with the set Lin(ℙ_{K}^{3}) of lines in ℙ_{K}^{3} .

i) Now we define a map

φ : Lin(ℙ_{K}^{3}) ⟶ ℙ_{K}^{5}

as follows. Let {e_{1}, …, e_{4}} be the canonical basis of K^{4} . Every line L ∈ Lin(ℙ_{K}^{3}) corresponds to a 2-dimensional vector subspace V of K^{4} . We choose a K -basis of V and represent it as a 4 × 2-matrix

V = ( \begin{matrix}a_{11} & a_{12} \\ a_{21} & a_{22} \\ a_{31} & a_{32} \\ a_{41} & a_{42} \end{matrix} )

with entries in K. Then we form the 6-tuple (d_{12}, d_{13}, d_{14}, d_{23}, d_{24}, d_{34}) of the 2 × 2-minors of V. Each minor is specified by choosing two rows, i.e. by a pair of indices (i, j) such that 1 ≤ i < j ≤ 4. We order the minors by ordering the pairs of indices decreasingly with respect to the lexicographic ordering on ℕ^{2} . Finally, we let φ(L) = (d_{12} : d_{13} : d_{14} : d_{23} : d_{24} : d_{34}). Prove that the map φ is well-defined and injective. The image of the map φ is called the Graßmannian of lines in ℙ_{K}^{3} and is denoted by Grass_{1}(ℙ_{K}^{3}). Hint: Show that we can assume d_{12} ≠ 0 without loss of generality. Then prove that there exists a basis of V such that the corresponding matrix has the shape

V′ = ( \begin{matrix}1 & 0 \\ 0 & 1 \\ a_{31} & a_{32} \\ a_{41} & a_{42} \end{matrix} )

j) Show how one can extend the preceding results in order to define the Graßmannian Grass_{m}(ℙ_{K}^{n}) of m-dimensional subspaces of ℙ_{K}^{n} for every m ∈ {1, …, n − 1}. Hint: For every (m+1)-dimensional K -vector subspace of K^{n+1} , there exists a basis such that its associated matrix has the shape

V = ( \begin{matrix}1 & 0 & ⋯ & 0 \\ 0 & 1 & ... & ⋮ \\ ⋮ & ... & ... & 0 \\ 0 & ⋯ & 0 & 1 \\ a_{m+2 1} & a_{m+2 2} & ⋯ & a_{m+2 m+1} \\ ⋮ & ⋮ & & ⋮ \\ a_{n+1 1} & a_{n+1 2} & ⋯ & a_{n+1 m+1} \end{matrix} )

The (m+1) × (m+1)-minors of such a matrix are specified by the tuples (i_{1}, …, i_{m+1}) of indices of chosen rows, where we assume that these indices are ordered by 1 ≤ i_{1} < ⋯ < i_{m+1} ≤ n + 1. Again we order those tuples decreasingly with respect to Lex and get an injective map of the set of (m+1)-dimensional K -vector subspaces of K^{n+1} to ℙ_{K}^{N}, where N = \binom{n+1}{m+1} − 1.

The final part of this tutorial is devoted to describing the Graßmannian Grass_{m}(ℙ_{K}^{n}) in more detail. In Volume 2 we shall introduce the notion of a projective variety as the set of zeros of a homogeneous ideal. In fact, Graßmannians are projective varieties. For the time being, we shall be content with finding some equations which vanish on the points of Grass_{m}(ℙ_{K}^{n}). This amounts to finding algebraic relations among the (m+1) × (m+1)-minors of an (n+1) × (m+1)-matrix.

k) Let us consider again the case m = 1 and n = 3. Show that the minors of size 2 × 2 of the matrix V′ above are algebraically related by the polynomial equation

d_{12}d_{34} − d_{13}d_{24} + d_{14}d_{23} = 0

l) Still in the case m = 1 and n = 3, consider the 2×2-minors d_{12}, …, d_{34} of the original matrix V. In order to find the algebraic relations among these minors, we form the polynomial ring

P = K[d_{12}, d_{13}, d_{14}, d_{23}, d_{24}, d_{34}, a_{11}, a_{21}, a_{31}, a_{41}, a_{12}, a_{22}, a_{32}, a_{42}]

in 14 indeterminates over K. Define a suitable ideal I ⊆ P such that the elimination ideal I ∩ K[d_{12}, d_{13}, d_{14}, d_{23}, d_{24}, d_{34}] is the desired ideal of algebraic relations. Write a CoCoA function which computes this elimination ideal, and show that it is principal.

m) More generally, for any m ∈ {1, …, n}, the ideal of algebraic relations among the minors of size (m+1) × (m+1) of a matrix V = (a_{ij}) of size (n+1) × (m+1) is called the ideal of Plücker relations. Implement a CoCoA function Pluecker(…) which takes m and n as input and computes a set of generators for the ideal of Plücker relations. Hint: Assume that the base ring has \binom{n+1}{m+1} indeterminates. Then form a larger polynomial ring having \binom{n+1}{m+1} + (m+1)(n+1) indeterminates, apply the CoCoA command Minors(…) appropriately, and transport the result of your computation back to the original ring using a suitable ring map.

Tutorial 36: Diophantine Systems and Integer Programming

Let A = (a_{ij}) ∈ Mat_{m,n}(ℤ) be a matrix having m rows, n columns, and integer entries. Furthermore, let (b_{1}, …, b_{m}) ∈ ℤ^{m} be a vector having m integer entries, and let z_{1}, …, z_{n} be indeterminates. Our first goal in this tutorial is to study the set of non-negative integer solutions of the following system of Diophantine inequalities.

\{ \begin{matrix}a_{11}z_{1} + a_{12}z_{2} + ⋯ + a_{1n}z_{n} & ≤ & b_{1} \\ a_{21}z_{1} + a_{22}z_{2} + ⋯ + a_{2n}z_{n} & ≤ & b_{2} \\ ⋮ & ⋮ & ⋮ \\ a_{m1}z_{1} + a_{m2}z_{2} + ⋯ + a_{mn}z_{n} & ≤ & b_{m} \end{matrix}

a) As a first step, we convert the above system of inequalities into a system of equations in the following way. We introduce new indeterminates z_{n+1}, …, z_{n+m} and consider the associated system of Diophantine equations

\{ \begin{matrix}a_{11}z_{1} + a_{12}z_{2} + ⋯ + a_{1n}z_{n} + z_{n+1} & = & b_{1} \\ a_{21}z_{1} + a_{22}z_{2} + ⋯ + a_{2n}z_{n} + z_{n+2} & = & b_{2} \\ ⋮ & ⋮ & ⋮ \\ a_{m1}z_{1} + a_{m2}z_{2} + ⋯ + a_{mn}z_{n} + z_{n+m} & = & b_{m} \end{matrix}

Prove that there is a one-to-one correspondence between the set of all solutions (α_{1}, …, α_{n}) ∈ ℕ^{n} of the above system of Diophantine inequalities and the set of non-negative integer solutions (α_{1}, …, α_{n}, α_{n+1}, …, α_{n+m}) in ℕ^{n+m} of the associated system of Diophantine equations. In view of this result, we shall from now on assume that our original

system is in fact a system of Diophantine equations, i.e. that we want to find the non-negative integer solutions (α_{1}, …, α_{n}) ∈ ℕ^{n} of the system

\{ \begin{matrix}a_{11}z_{1} + a_{12}z_{2} + ⋯ + a_{1n}z_{n} & = & b_{1} \\ a_{21}z_{1} + a_{22}z_{2} + ⋯ + a_{2n}z_{n} & = & b_{2} \\ ⋮ & ⋮ & ⋮ \\ a_{m1}z_{1} + a_{m2}z_{2} + ⋯ + a_{mn}z_{n} & = & b_{m} \end{matrix}

which we shall denote by S.

For our next step in the solution process, we need some additional definitions. Let y_{1}, …, y_{m} be further indeterminates. A product of the form y_{1}^{i_{1}} ⋯ y_{m}^{i_{m}}, where we have (i_{1}, …, i_{m}) ∈ ℤ^{m}, is called an extended term in the indeterminates y_{1}, …, y_{m}. The set of all extended terms will be denoted by 𝔼^{m}. It is clearly a monoid with respect to multiplication.

Now let K be a field. An expression of the form

f = ∑_{(i_{1},...,i_{m})∈ℤ^{m}} c_{(i_{1},...,i_{m})} y_{1}^{i_{1}} ⋯ y_{m}^{i_{m}}

where only finitely many elements c_{(i_{1},...,i_{m})} ∈ K are different from zero, is called a Laurent polynomial in the indeterminates y_{1}, …, y_{m}. The set of all Laurent polynomials is clearly a K -algebra and will be denoted by L = K[y_{1}, …, y_{m}, y_{1}^{−1}, …, y_{m}^{−1}].

b) Prove that the map log : 𝔼^{m} ⟶ ℤ^{m} defined by y_{1}^{i_{1}} ⋯ y_{m}^{i_{m}} ↦ (i_{1}, …, i_{m}) is an isomorphism of groups.

c) Prove that a tuple (α_{1}, …, α_{n}) ∈ ℕ^{n} is a solution of S if and only if the following equations hold in L.

\{ \begin{matrix}y_{1}^{a_{11}α_{1}+a_{12}α_{2}+···+a_{1n}α_{n}} & = & y_{1}^{b_{1}} \\ y_{2}^{a_{21}α_{1}+a_{22}α_{2}+···+a_{2n}α_{n}} & = & y_{2}^{b_{2}} \\ ⋮ & ⋮ & ⋮ \\ y_{m}^{a_{m1}α_{1}+a_{m2}α_{2}+···+a_{mn}α_{n}} & = & y_{m}^{b_{m}} \end{matrix}

d) Prove that a tuple (α_{1}, …, α_{n}) ∈ ℕ^{n} is a solution of S if and only if the following equation holds in L.

y_{1}^{a_{11}α_{1}+a_{12}α_{2}+···+a_{1n}α_{n}} ⋯ y_{m}^{a_{m1}α_{1}+a_{m2}α_{2}+···+a_{mn}α_{n}} = y_{1}^{b_{1}} ⋯ y_{m}^{b_{m}}

e) For i = 1, …, n, we define the extended term t_{i} = y_{1}^{a_{1i}}y_{2}^{a_{2i}} ⋯ y_{m}^{a_{mi}}. (Notice that its exponents correspond to the i^{th} column of the matrix A.)

Prove that a tuple (α_{1}, …, α_{n}) ∈ ℕ^{n} is a solution of S if and only if the following equation holds in L.

t_{1}^{α_{1}} ⋯ t_{n}^{α_{n}} = y_{1}^{b_{1}} ⋯ y_{m}^{b_{m}}

Conclude that there exists a solution of S in ℕ^{n} if and only if the extended term y_{1}^{b_{1}} ⋯ y_{m}^{b_{m}} is an element of the K -subalgebra K[t_{1}, …, t_{n}] of L.

In the second part of this tutorial, we try to apply the knowledge acquired above for solving the integer programming problem in a special case. For this, we shall from now on assume that the entries of the matrix A and the vector b = (b_{1}, …, b_{m}) are non-negative integers. Moreover, we suppose that we are given a non-zero tuple (c_{1}, …, c_{n}) ∈ ℕ^{n} of natural numbers.

The map C : ℕ^{n} ⟶ ℕ defined by (α_{1}, …, α_{n}) ↦ c_{1}α_{1} + ⋯ + c_{n}α_{n} is called the linear cost function associated to (c_{1}, …, c_{n}). The integer programming problem IP(A, b, C) asks for those solutions of the system S for which the cost function C is minimal.

In the sequel, let {x_{1}, …, x_{n}} be new indeterminates, let Q be the ring Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{m}], let J = (x_{1} − t_{1}, …, x_{n} − t_{n}) ⊆ Q, and let σ be an elimination ordering for {y_{1}, …, y_{m}} on 𝕋(x_{1}, …, x_{n}, y_{1}, …, y_{m}).

f) Show that NF_{σ,J}(y_{1}^{b_{1}} ⋯ y_{m}^{b_{m}}) is a term (see Exercise 5 of Section 2.5).

g) Prove that (α_{1}, …, α_{n}) ∈ ℕ^{n} is a solution of S if and only if the polynomial y_{1}^{b_{1}} ⋯ y_{m}^{b_{m}} − x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} is contained in J. Hint: Show that t_{1}^{α_{1}} ⋯ t_{n}^{α_{n}} ≡ x_{1}^{α_{1}}t_{2}^{α_{2}} ⋯ t_{n}^{α_{n}} ≡ ⋯ ≡ x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} modulo J.

h) Prove that the system S has solutions if and only if NF_{σ,J}(y_{1}^{b_{1}} ⋯ y_{m}^{b_{m}}) is contained in the subring K[x_{1}, …, x_{n}] of Q.

i) Write a CoCoA function IsSolvable(…) which takes A and (b_{1}, …, b_{m}) and decides whether the corresponding system S is solvable.

j) Use your function IsSolvable(…) to check whether the following systems of Diophantine equations are solvable.

1)  ( \begin{matrix}3 & 1 & 11 & 2 & 3 \\ 4 & 5 & 0 & 1 & 7 \\ 5 & 6 & 1 & 9 & 2 \end{matrix} ) ( x_{1} ; ⋮ ; x_{5} ) = ( \begin{matrix}20 \\ 17 \\ 23 \end{matrix} )

2)  ( \begin{matrix}3 & 1 & 11 & 2 & 3 \\ 4 & 5 & 0 & 1 & 7 \\ 5 & 6 & 1 & 9 & 2 \end{matrix} ) ( x_{1} ; ⋮ ; x_{5} ) = ( \begin{matrix}20 \\ 17 \\ 21 \end{matrix} )

3)  ( \begin{matrix}3 & 1 & 11 & 2 & 3 & 5 & 3 \\ 4 & 5 & 0 & 1 & 7 & 4 & 6 \\ 5 & 6 & 1 & 9 & 2 & 3 & 3 \end{matrix} ) ( x_{1} ; ⋮ ; x_{7} ) = ( \begin{matrix}31 \\ 27 \\ 38 \end{matrix} )

k) Implement a CoCoA function DioSysSolve(…) which takes a matrix A and a tuple (b_{1}, …, b_{m}) such that the corresponding system S is solvable and uses the above results to find a solution of S.

l) Use your function DioSysSolve(…) to find explicit solutions for those systems of Diophantine equations above which are solvable.

m) Find an elimination ordering σ for the set of indeterminates {y_{1}, …, y_{m}} on 𝕋(x_{1}, …, x_{n}, y_{1}, …, y_{m}) such that the restriction σ̂ of σ to the monoid of terms 𝕋(x_{1}, …, x_{n}) is cost compatible. By this we mean that σ̂ has the property that whenever C(α_{1}, …, α_{n}) ≥ C(β_{1}, …, β_{n}) for two tuples (α_{1}, …, α_{n}), (β_{1}, …, β_{n}) ∈ ℕ^{n}, then we have the inequality x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} ≥σ̂ x_{1}^{β_{1}} ⋯ x_{n}^{β_{n}}.

n) Write a CoCoA function CcOrd(…) which takes (c_{1}, …, c_{n}) ∈ ℕ^{n} \ {0} and computes a matrix V ∈ Mat_{m+n}(ℤ) such that the associated term ordering Ord(V) is an elimination ordering for {y_{1}, …, y_{m}} whose restriction to 𝕋(x_{1}, …, x_{n}) is cost-compatible.

o) Let σ be an elimination ordering for {y_{1}, …, y_{m}} whose restriction to 𝕋(x_{1}, …, x_{n}) is cost-compatible. Assume that the system S has solutions, i.e. that there exist numbers α_{1}, …, α_{n} ∈ ℕ such that we have x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} = NF_{σ,J}(y_{1}^{b_{1}} ⋯ y_{m}^{b_{m}}). Then show that

C(α_{1}, …, α_{n}) = min{C(β_{1}, …, β_{n})|(β_{1}, …, β_{n}) ∈ ℕ^{n} is a solution of S}

In other words, the tuple (α_{1}, …, α_{n}) is a solution of the integer programming problem IP(A, b, C).

p) Write a CoCoA function IPSolve(…) which takes A, (b_{1}, …, b_{m}), and (c_{1}, …, c_{n}), checks whether the corresponding system S is solvable, and computes a solution of the integer programming problem IP(A, b, C) in that case.

q) Use your function IPSolve(…) to solve the following integer programming problems.

1) A and b as in k1), (c_{1}, …, c_{5}) = (23, 15, 6, 7, 1)

2) A and b as in k3), (c_{1}, …, c_{7}) = (23, 15, 67, 1, 53, 4)

3.5 Localization and Saturation

All generalizations are dangerous,

even this one. (Alexandre Dumas jr.)

In the previous sections, we saw several ways to compute colon ideals and colon modules. Let us apply our knowledge in an easy case. Suppose we are given the ideal I = (x^{2}, xy^{2}, y^{3}z^{4}) in the polynomial ring P = K[x, y, z] over a field K. When we compute the colon ideal I : (y), we get (x^{2}, xy, y^{2}z^{4}). When we compute I : (y^{2}) instead, we get I : (y^{2}) = (x, yz^{4}). Continuing this way, we find I : (y^{3}) = (x, z^{4}), and it is easy to see that I : (y^{d}) = (x, z^{4}) for every d ≥ 3.

What conclusions can we draw from this example? First of all, we observe the phenomenon that the process of forming I : (y^{d}) for d = 1, 2, 3, … stabilizes after a while. This leads to a new ideal which is called the saturation of I with respect to (y) and is denoted by I : (y)^{∞}. In the case we just looked at, the ideal I : (y)^{∞} is generated by {x, z^{4}}.

But there is more to see. Suppose we could consider y as an invertible element. Then, clearly, the ideal I would be equal to the ideal generated by {x, z^{4}}. Two completely different approaches lead to the same result. A chain of colon ideals stabilizes exactly at the ideal which could be obtained by considering one element as invertible. Although it may appear to be dangerous to draw such general conclusions from such an easy example, this is not a coincidence. Rather, it is a special case of an algebraic process which we study in the first part of this section.

To do that, we need to make a brief detour in order to introduce localization. Localization allows us to consider some elements of a ring as invertible. Everybody is familiar with the operation of inverting all non-zero integers in order to get the field of rational numbers. Localization is a far-reaching generalization of this process to arbitrary rings, to arbitrary multiplicatively closed sets of elements which are to be inverted, and to arbitrary modules over those rings. We can even divide by zero! (If this looks like localization could turn into a nightmare, take solace in the fact that localizing in zero makes a module vanish.)

Since you know our style by now, it is clear that we are not going to treat the subject of localization in the style of Bourbaki. Instead, we content ourselves with pointing out one aspect which is relevant from the computational point of view. The localization of a ring R at one element can be represented as a residue class ring of R[y] (see Proposition 3.5.6).

In the second subsection, we generalize the above example and define the saturation of a module N by an ideal I in another module M. As for colon modules, we immediately reduce the computation of saturations to the case of submodules of P^{r}, where P is a polynomial ring over a field. Generalizing the above example again, it turns out that the saturation of a module is the limit of a suitable family of colon modules (see Proposition 3.5.9). This gives us a first naïve method for computing saturations.

More sophisticated methods can be derived from the link between saturations and localizations provided by Proposition 3.5.11. It says that the saturation with respect to a principal ideal can also be obtained by extending the module to the localization at the generating element and then contracting it back. Our main Theorem 3.5.13 offers several approaches to the computation of saturations based on this idea.

The most important uses of saturation calculations are for more advanced tasks such as computing primary decompositions (see Tutorial 43), local cohomology modules, and the defining ideals of projective algebraic varieties or schemes. At the end of the current section, we solve a more modest problem and show how to solve the radical membership problem (see Corollary 3.5.15).

After saturating you with promises, let us get going and do some real mathematics!

3.5.A Localization

In this subsection we let R be a commutative ring and M an R-module.

Definition 3.5.1. A subset S ⊆ R is called multiplicatively closed if 1_{R} ∈ S and the product of any two elements of S is again contained in S.

For instance, a multiplicatively closed set is obtained by taking an element f ∈ R and considering the set of its powers S = {f^{i} | i ∈ ℕ}. Another common example occurs when R is an integral domain. Then S = R \ {0} is a multiplicatively closed subset of R. In this case, we have already made use of the field of fractions of R, i.e. the field consisting of the fractions \frac{r}{s}, where r ∈ R and s ∈ S.

Given a multiplicatively closed subset S of an arbitrary commutative ring R, the process of forming the field of fractions of a domain can be generalized as follows.

Proposition 3.5.2. Let R be a commutative ring, let M be an R-module, and let S be a multiplicatively closed subset of R. We consider the set of pairs {(m, s) | m ∈ M, s ∈ S}. For two such pairs (m, s), (m′, s′), we let (m, s) ∼ (m′, s′) if and only if there exists an element s′′ ∈ S such that s′′(sm′ − s′m) = 0.

a) The relation ∼ is an equivalence relation.

b) Let us denote the set of all equivalence classes by M_{S} and the equivalence class of a pair (m, s) by \frac{m}{s}. Then the rules

\frac{m}{s} + \frac{m′}{s′} = \frac{s′m + sm′}{ss′}  and  r · \frac{m}{s} = \frac{rm}{s}

for all r ∈ R, for all m, m′ ∈ M, and for all s, s′ ∈ S make M_{S} into an R-module. c) The map M ⟶ M_{S} defined by m ⟼ \frac{m}{1} is R-linear.

d) For r, r′ ∈ R, for m ∈ M, and for s, s′ ∈ S, the rules

\frac{r}{s} · \frac{r′}{s′} = \frac{rr′}{ss′}  and  \frac{r}{s} · \frac{m}{s′} = \frac{rm}{ss′}

make R_{S} into a ring and M_{S} into an R_{S} -module.

Proof. Since the relation ∼ is clearly reflexive and symmetric, it suffices to show that it is transitive. Suppose that (m, s) ∼ (m′, s′) ∼ (m′′, s′′), i.e. that there exist elements t, u ∈ S such that we have t(sm′ − s′m) = 0 and u(s′m′′ − s′′m′) = 0. Then tuss′′m′ = tus′s′′m and tuss′′m′ = tuss′m′′. This implies tus′(sm′′ − s′′m) = 0, and therefore (m, s) ∼ (m′′, s′′). Thus claim a) is proved. The remaining claims follow from the observation that the stated rules and maps are independent of the choice of representatives of the involved equivalence classes. □

In particular, part c) of this proposition says that the map R ⟶ R_{S} defined by r ↦ \frac{r}{1} is an R-algebra homomorphism. Clearly, the R_{S} -module M_{S} is generated by the elements in the image of the canonical map M ⟶ M_{S}.

Definition 3.5.3. In the situation of the proposition, the R_{S} -module M_{S} is called the localization of M at S or the module of fractions of M with respect to S.

Some authors use the notation S^{−1}M or M[S^{−1}] for the module of fractions M_{S}. If the multiplicatively closed set S is of the form S = {f^{i} | i ∈ ℕ} with an element f ∈ R, we shall write M_{f} instead of M_{S} and speak of the localization of M at the element f.

Using the definition of ∼, it follows immediately that an element m ∈ M maps to \frac{m}{1} = 0 in M_{S} if and only if sm = 0 for some s ∈ S. For a finitely generated R-module M, we can then see that M_{S} = 0 is equivalent to Ann_{R}(M) ∩ S ≠ ∅. In particular, we have M_{S} = 0 if 0 ∈ S.

Example 3.5.4. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, and let S be the set of polynomials with non-zero constant term. Then S is a multiplicatively closed subset of P, and the ring P_{S} consists of those rational functions which are defined at the point (0, …, 0).

More generally, let 𝔭 be a prime ideal in R. Then the set S = R \ 𝔭 is a multiplicatively closed subset of R, and we can form the ring R_{S}. In commutative algebra, this ring is usually denoted by R_{𝔭}. In algebraic geometry, it is related to the ring of germs of functions at a point of a certain topological space. This is the reason why it is called the localization of R at 𝔭.

Our next objective is to understand the concept of localization at an element in a different way. The following auxiliary result will prove useful for this purpose. For a more general version, look at Exercise 5.

Proposition 3.5.5. (Extended Division) Let R be a ring, let f ∈ R, let y be a new indeterminate, and let g(y) be a non-zero polynomial in R[y]. Then there exist a polynomial q(y) ∈ R[y] and an element r ∈ R such that

f^{deg(g)}g(y) = q(y) · (fy − 1) + r

Proof. Writing g(y) = ∑_{i=0}^{γ} c_{i}y^{i} with γ = deg(g) ∈ ℕ and c_{0}, …, c_{γ} ∈ R, we see that the polynomial f^{γ}g(y) = ∑_{i=0}^{γ} f^{γ−i}c_{i}(fy)^{i} ∈ R[y] is of the form g̃(fy) with a polynomial g̃(y) ∈ R[y]. Next, we substitute y + 1 for y and decompose g̃(y +1) in the form g̃(y +1) = q̃(y)·y +r, where q̃(y) ∈ R[y] and r ∈ R. After we perform the substitution y ↦ fy − 1, this equation becomes

f^{γ}g(y) = g̃(fy) = q̃(fy − 1) · (fy − 1) + r = q(y) · (fy − 1) + r

with q(y) = q̃(fy − 1) ∈ R[y], as desired. □

Proposition 3.5.6. Let R be a ring, let f ∈ R \ {0}, and let y be a new indeterminate. Then there exists an isomorphism of R-algebras

R_{f} ≅ R[y]/(fy − 1)

Proof. The R-algebra homomorphism φ : R[y] ⟶ R_{f} defined by y ↦ \frac{1}{f} is clearly surjective and satisfies fy −1 ∈ Ker(φ). Suppose g(y) ∈ Ker(φ)\{0}. Using Extended Division 3.5.5, we find a representation f^{γ}g(y) = q(y) · (fy − 1) + r, where γ = deg(g), where q(y) ∈ R[y], and where r ∈ R. By applying the map φ, we get the equation r = f^{γ}g(\frac{1}{f}) = 0 in R_{f}, because we started with g(y) ∈ Ker(φ). Thus there exists an i > 0 such that f^{i}r = 0. Consequently, f^{γ+i}g(y) = f^{i}q(y)(fy − 1) implies

g(y) = f^{γ+i}y^{γ+i}g(y) − (f^{γ+i}y^{γ+i} − 1)g(y)
= f^{i}y^{γ+i}q(y) · (fy − 1) − (f^{γ+i−1}y^{γ+i−1} + f^{γ+i−2}y^{γ+i−2} + ⋯ + 1)
·(fy − 1) · g(y)
∈ (fy − 1)

and therefore Ker(φ) = (fy − 1). □

Of course this is only a very small portion of what can be said about the concept of localization. But for the time being, it is enough for us to understand the connection to saturation which follows now.

3.5.B Saturation

The following definition of the saturation of a module by an ideal resembles the definition of the colon module. But there is one important difference: for each element m ∈ M, we may have to choose a different exponent i such that I^{i}m ⊆ N, and there is no a priori bound on those exponents.

Definition 3.5.7. Let R be a commutative ring, let I be an ideal in R, let U be an R-module, and let M and N be two R-submodules of U. Then the set

N :_{M} I^{∞} = ⋃_{i∈ℕ} N :_{M} I^{i} = {m ∈ M | I^{i} · m ⊆ N for some i ∈ ℕ}

is an R-submodule of M. It is called the saturation of N by I in M.

In this subsection we want to provide the reader with some explicit methods for computing saturations of finitely generated modules over affine algebras. As usual, we let K be a field and P = K[x_{1}, …, x_{n}] a polynomial ring over K. With the following result we reduce the general problem of computing saturations to the case of submodules of a finitely generated free P -module. The procedure is completely analogous to the one we followed in Proposition 3.2.18, and the proof is also the same.

Proposition 3.5.8. Let J be an ideal in P, let U be a finitely generated module over the affine K -algebra P/J, and let M and N be P/J -sub-modules of U. Furthermore, let I be an ideal in P containing J. Our goal is to compute N :_{M} (I/J)^{∞}.

Suppose we are given a presentation U ≅ P^{r}/V with a P -submodule V of P^{r}. We can write M = M′/V and N = N′/V with P -submodules M′ and N′ of P^{r} containing V . Then N :_{M} (I/J)^{∞} is the residue class module of N′ :_{M′} I^{∞} in U.

Again, as a consequence of this proposition, we shall from now on consider only the case of submodules M and N of P^{r} for some r ≥ 0, and of an ideal I ⊆ P. The following naïve method for computing N :_{M} I^{∞} frequently works well in practice, although it requires the computation of an a priori unknown number of Gröbner bases.

Proposition 3.5.9. For some number i ∈ ℕ we have N :_{M} I^{i} = N :_{M} I^{i+1} . If we let μ = min{i ∈ ℕ | N :_{M} I^{i} = N :_{M} I^{i+1}}, then

N :_{M} I^{∞} = N :_{M} I^{μ} = N :_{M} I^{μ+1} = ⋯

Proof. For m ∈ M such that I^{i}m ⊆ N for some i ≥ 0, we obviously have I^{i+1}m ⊆ N. Thus there is a chain N :_{M} I ⊆ N :_{M} I^{2} ⊆ ⋯ ⊆ M which becomes stationary after a while, because M is a Noetherian P -module by Hilbert’s Basis Theorem 2.4.6. This prove the first claim.

Now we assume that N :_{M} I^{i} = N :_{M} I^{i+1} for some i ≥ 0, and we let m ∈ N :_{M} I^{i+2} . Since I^{i+2}m ⊆ N, we get I^{i+1}fm ⊆ N for all f ∈ I, and therefore I^{i}fm ⊆ N. Thus we have shown N :_{M} I^{i+2} ⊆ N :_{M} I^{i+1} , and since the other inclusion holds trivially, we find N :_{M} I^{i+2} = N :_{M} I^{i+1} . Inductively, we obtain N :_{M} I^{i} = N :_{M} I^{j} for all j ≥ i. In view of the above chain of submodules, this finishes the argument. □

Notice that we have N :_{M} I^{i+1} = (N :_{M} I^{i}) :_{M} I, so that we can compute the colon modules required by this proposition also by repeatedly taking the colon module by I.

Example 3.5.10. Let I be the ideal (x_{1}^{2}x_{2} − 2x_{1}x_{2}^{2} + x_{2}^{3}, x_{1}^{3} − 3x_{1}x_{2}^{2} + 2x_{2}^{3}, x_{1}x_{2}^{2}x_{3}^{2} − x_{2}^{3}x_{3}^{2} − x_{1}x_{2}^{3} + x_{2}^{4}, x_{2}^{3}x_{3}^{4} − 2x_{2}^{4}x_{3}^{2} + x_{2}^{5}) in the polynomial ring P = ℚ[x_{1}, x_{2}, x_{3}]. Suppose we want to determine I :_{P} (x_{1})^{∞}.

When we compute I_{1} = I :_{P} (x_{1}), we get I_{1} = (x_{1}^{2} −2x_{1}x_{2} +x_{2}^{2}, x_{1}x_{2}x_{3}^{2} − x_{2}^{2}x_{3}^{2}−x_{1}x_{2}^{2}+x_{2}^{3}, x_{2}^{2}x_{3}^{4}−2x_{2}^{3}x_{3}^{2}+x_{2}^{4}). Then we can check that I ⊂ I_{1} . Thus we have to compute I_{2} = I_{1} :_{P} (x_{1}) next. We get I_{2} = (x_{1}^{2} − 2x_{1}x_{2} + x_{2}^{2}, x_{1}x_{3}^{2} − x_{2}x_{3}^{2} − x_{1}x_{2} + x_{2}^{2}, x_{2}x_{3}^{4} − 2x_{2}^{2}x_{3}^{2} + x_{2}^{3}). Again we can check that I_{1} ⊂ I_{2} . Continuing this way, we calculate I_{3} = I_{2} :_{P} (x_{1}) = (x_{1}^{2} − 2x_{1}x_{2} + x_{2}^{2}, x_{1}x_{3}^{2} − x_{2}x_{3}^{2} − x_{1}x_{2} + x_{2}^{2}, x_{3}^{4} − 2x_{2}x_{3}^{2} + x_{2}^{2}) and check that I_{2} ⊂ I_{3} . Finally, the ideal I_{4} = I_{3} :_{P} (x_{1}) = (x_{1}^{2} − 2x_{1}x_{2} + x_{2}^{2}, x_{1}x_{3}^{2} − x_{2}x_{3}^{2} − x_{1}x_{2} + x_{2}^{2}, x_{3}^{4} − 2x_{2}x_{3}^{2} + x_{2}^{2}) satisfies I_{3} = I_{4} .

Using the proposition, we conclude that I :_{P} (x_{1})^{∞} = I_{3} = (x_{1}^{2} − 2x_{1}x_{2} + x_{2}^{2}, x_{1}x_{3}^{2} − x_{2}x_{3}^{2} − x_{1}x_{2} + x_{2}^{2}, x_{3}^{4} − 2x_{2}x_{3}^{2} + x_{2}^{2}).

Of course, it would be nice if we could predict the number μ in the proposition beforehand. Some attempts in this direction are contained in Tutorial 37.

The reason for the importance of localizations with respect to the problem of computing saturations is that the saturation of a submodule of P^{r} with respect to a principal ideal can be viewed as the combination of extending the submodule to the localization and contracting it back. In the next proposition, the module P^{r} will be considered as a subset of (P^{r})_{f} via the canonical map.

Proposition 3.5.11. (Saturation and Localization) Let M and N be two P -submodules of P^{r}, and let I = (f) be a principal ideal in P generated by a non-zero polynomial f ∈ P.

a) The P_{f} -module N_{f} can be identified with the P_{f} -submodule of (P^{r})_{f} generated by the images of the elements of N under the canonical map P^{r} ⟶ (P^{r})_{f}.

b) We have N :_{M} I^{∞} = N_{f} ∩ M.

Proof. To prove a), we denote the canonical map N ⟶ P^{r} by ι, and we let φ be the map φ : N_{f} ⟶ (P^{r})_{f} given by φ(\frac{v}{f^{i}}) = \frac{ι(v)}{f^{i}}. It is easy to check that φ is well-defined and injective, and this implies the claim.

Now we show claim b). To prove “⊆”, let v ∈ M and i ∈ ℕ such that I^{i} · v ⊆ N. By a), the fact that f^{i}v ∈ N implies \frac{v}{1} = \frac{1}{f^{i}} · f^{i}v ∈ N_{f}. Next we show “⊇”. Given a vector v ∈ M such that \frac{v}{1} = \frac{w}{f^{i}} for some w ∈ N and some i ∈ ℕ, we have f^{i+j}v = f^{j}w in P^{r} for some j ∈ ℕ, and thus f^{i}v = w ∈ N. Hence we get v ∈ N :_{M} I^{i} ⊆ N :_{M} I^{∞}. □

How can we use this connection between localizations and saturations? The key for turning it into an algorithm is the presentation we found in Proposition 3.5.6 for the localization at an element. Using this presentation, we can explicitly perform the process of extending the submodule and contracting it back. Thus we arrive at several new methods for computing saturations.

Lemma 3.5.12. Let M and N be two P submodules of P^{r}, and let I and J be two ideals in P. Then we have

(N :_{M} I^{∞}) ∩ (N :_{M} J^{∞}) = N :_{M} (I + J)^{∞}

Proof. Only the inclusion “⊆” needs to be shown. Let v ∈ M such that I^{i}v ⊆ N and J^{j}v ⊆ N for some i, j ∈ ℕ. Then we have (f + g)^{i+j}v ∈ N for all f ∈ I and all g ∈ J, because in the expansion of (f + g)^{i+j} every summand is divisible by f^{i} or g^{j}. Thus the claim is proved. □

Theorem 3.5.13. (Computation of Saturations) Let M and N be two non-zero P -submodules of P^{r}, let I be a non-zero ideal in P, and let y be a new indeterminate. In the following, we identify P^{r} with its image in P [y]^{r}.

a) Suppose that I = (f) is a principal ideal generated by a non-zero polynomial f ∈ P. Then we have

N :_{M} (f)^{∞} = (NP [y] + (fy − 1) · P [y]^{r}) ∩ M

b) Let {f_{1}, …, f_{s}} be a system of generators of I. Then we have

N :_{M} I^{∞} = ⋂_{i=1}^{s} N :_{M} (f_{i})^{∞}

c) Let {f_{1}, …, f_{s}} be a system of generators of I. In P [y], we form the polynomial f(y) = f_{1} + f_{2}y + ⋯ + f_{s}y^{s−1} . Then we have

N :_{M} I^{∞} = (NP [y] :_{P [y]^{r}} (f(y))^{∞}) ∩ M

Proof. To prove the first claim, we take an element v ∈ M which satisfies I^{i} · v ⊆ N for some i ≥ 1. Then v = f^{i}y^{i}v − (1 + fy + ⋯ + f^{i−1}y^{i−1})(fy − 1)v is contained in the right-hand side. Conversely, let v be an element of (NP [y] + (fy − 1)P [y]^{r}) ∩ M, and let {w_{1}, …, w_{u}} ⊆ N \ {0} be a system of generators of N. Then there are polynomials g_{1}, …, g_{u}, h_{1}, …, h_{r} ∈ P [y] such that v = g_{1}w_{1} + ⋯ + g_{u}w_{u} + h_{1}(fy − 1)e_{1} + ⋯ + h_{r}(fy − 1)e_{r}, where {e_{1}, …, e_{r}} denotes the canonical basis of P [y]^{r}. After considering this as an equation in (P_{f}[y])^{r}, we perform the substitution y ↦ \frac{1}{f} . Since v ∈ P^{r} is invariant under this substitution, we obtain

v = g_{1}(x_{1}, …, x_{n}, \frac{1}{f})w_{1} + ⋯ + g_{u}(x_{1}, …, x_{n}, \frac{1}{f})w_{u}

Let f^{j} be a common denominator of g_{1}(x_{1}, …, x_{n}, \frac{1}{f}), …, g_{u}(x_{1}, …, x_{n}, \frac{1}{f}). Now it suffices to multiply everything with f^{j} in order to see that f^{j}v ∈ N. Thus we have v ∈ N :_{M} I^{∞}.

Claim b) follows by induction from the lemma. Finally, to prove c), we note that I^{i} · v ⊆ N for some vector v ∈ M and some i ∈ ℕ implies f_{α_{1}} ⋯ f_{α_{i}} v ∈ N for all α_{1}, …, α_{i} ∈ {1, …, s}. On the other hand, we have

f(y)^{i}v = ∑_{α_{1},...,α_{i}=1}^{s} c_{(α_{1},...,α_{i})}f_{α_{1}} ⋯ f_{α_{i}} y^{α_{1}+···+α_{i}−i} v

for suitable coefficients c_{(α_{1},...,α_{i})} ∈ ℕ. Hence we obtain f(y)^{i}v ∈ NP [y].

To show the other inclusion, we proceed by induction on s and note that the case s = 1 is trivially true. For s > 1, we start with an element v ∈ M satisfying f(y)^{i}v ∈ NP [y] for some i ∈ ℕ and expand f(y)^{i}v as above. We consider P [y] as a polynomial ring in one indeterminate y over the ring P and equip it with the standard grading deg(y) = 1. Then the P [y]-submodule NP [y] of P [y]^{r} is a graded submodule, of P [y]^{r}, since it is generated by homogeneous elements of degree zero (see Proposition 1.7.10). Therefore we have ∑_{α_{1}+···+α_{i}−i=j} c_{(α_{1},...,α_{i})}f_{α_{1}} ⋯ f_{α_{i}}v ∈ N for all j ∈ ℕ. In particular, the case j = i(s − 1) implies f_{s}^{i}v ∈ N.

Since we know v ∈ NP [y] :_{P [y]^{r}} (f(y))^{∞} and v ∈ NP [y] :_{P [y]^{r}} (f_{s}y^{s−1})^{∞}, we can use the lemma to get v ∈ MP [y] :_{P [y]^{r}} (f_{1} + f_{2}y + ⋯ + f_{s−1}y^{s−2})^{∞}. Now we apply the induction hypothesis and obtain v ∈ N :_{M} (f_{1}, …, f_{s−1})^{∞}. Together with v ∈ N :_{M} (f_{s})^{∞} and the lemma, this implies the claim. □

Example 3.5.14. Consider again the ideal I ⊆ P = ℚ[x_{1}, x_{2}, x_{3}] given in Example 3.5.10. If we want to compute I :_{P} (x_{1})^{∞} using the method suggested by part a) of the theorem, we have to form the polynomial ideal J = I + (1 − x_{1}y) in P [y]. Then we eliminate y and get again the correct answer J ∩P = (x_{1}^{2} −2x_{1}x_{2} +x_{2}^{2}, x_{1}x_{3}^{2} −x_{2}x_{3}^{2} −x_{1}x_{2} +x_{2}^{2}, x_{3}^{4} −2x_{2}x_{3}^{2} +x_{2}^{2}) = I :_{P} (x_{1})^{∞}.

As an application of the previous theorem, we find an effective criterion for checking whether a given polynomial is in the radical of some ideal. Notice that this problem is much easier than the problem of actually computing the radical of an ideal which will be studied in Section 3.7.

Corollary 3.5.15. (Radical Membership Test) Let I be an ideal in P, let f ∈ P \ {0}, and let y be a new indeterminate. Then the following conditions are equivalent.

a) We have f ∈ \sqrt{I}.

b) We have IP_{f} = P_{f}.

c) We have 1 ∈ I :_{P} (f)^{∞}.

d) In the ring P [y] we have 1 ∈ IP [y] + (fy − 1).

e) Every Gröbner basis of the ideal IP [y] + (fy − 1) in P [y] contains an element of K \ {0}.

f) The reduced Gröbner basis of the ideal IP [y] + (fy − 1) in P [y] with respect to every term ordering is {1}.

Proof. First we show the equivalence of a) and b). Let f^{i} ∈ I for some i ∈ ℕ. Then 1 = f^{i} · \frac{1}{f^{i}} ∈ IP_{f}. Conversely, if 1 ∈ IP_{f}, then there exist a polynomial g ∈ I and a number i ∈ ℕ such that 1 = \frac{g}{f^{i}} . Using the definition of P_{f}, we get f^{i} = g ∈ I. The equivalence of b) and c) follows from Proposition 3.5.11.b, and the equivalence of c) and d) from Theorem 3.5.13.a. Finally, it is clear that the last two conditions are nothing but reformulations of d). □

Example 3.5.16. Once again, let I be the ideal of P = ℚ[x_{1}, x_{2}, x_{3}] given in Example 3.5.10. Suppose we want to check whether f = x_{1}x_{2} − x_{1}x_{3}^{2} is contained in \sqrt{I}. In the ring P [y], we compute a reduced Gröbner basis of the ideal IP [y] + (fy − 1) and get \{1\}. Hence we conclude that f ∈ \sqrt{I}.

Exercise 1. Let R be a ring, let M be a finitely generated R-module, and let S ⊆ R be a multiplicatively closed subset. Prove that the following conditions are equivalent.

a) M_{S} = 0

b) Ann_{R}(M) ∩ S ≠ 0

Exercise 2. Let R be a ring and 𝔭 a prime ideal in R.

a) Show that S = R \ 𝔭 is a multiplicative set.

b) Prove that the ring R_{S} has a unique maximal ideal. Describe the elements of that ideal.

Exercise 3. Let R be a ring, let M be an R-module, and let S ⊆ R be a multiplicatively closed set. Prove that the localization M_{S} has the following universal property. If N is any R-module such that the multiplication map μ_{s} : N ⟶ N is bijective for every element s ∈ S, and if φ : M ⟶ N is an R-linear map, then there exists precisely one R-linear map ψ : M_{S} ⟶ N such that φ = ψ ∘ ι, where ι : M ⟶ M_{S} is the canonical map.

Exercise 4. Let P be a polynomial ring over a field K, let f_{1}, …, f_{s} ∈ P be non-zero polynomials, and let S be the multiplicative monoid generated by {f_{1}, …, f_{s}}. Show that there is an isomorphism P_{S} ≅ P [y]/(fy − 1), where f = ∏_{i=1}^{s} f_{i}.

Exercise 5. Let R be a ring, let y be an indeterminate, and let g(y), h(y) ∈ R[y] \ {0}. Moreover, we let γ = max{deg(g) − deg(h) + 1, 0}, and we let a ∈ R be the leading coefficient of h(y).

a) Prove that there exist polynomials q(y), r(y) ∈ R[y] such that we have r(y) = 0 or deg(r) < deg(h), and such that

a^{γ}g(y) = q(y)h(y) + r(y)

Hint: Proceed by induction on deg(g). If deg(g) ≥ deg(h), consider the polynomial a g(y) − b y^{deg(g)−deg(h)}h(y), where b is the leading coefficient of g(y).

b) In the situation of a), show that q(y) and r(y) are uniquely determined if a is a non-zerodivisor of R.

Exercise 6. Let R be a ring, let I be an ideal in R, and let 𝔭 be a prime ideal in R. Prove that if r ∈ (R \ 𝔭) ∩ \sqrt{I}, then (𝔭 ∩ I) : r^{∞} = 𝔭.

Exercise 7. Let R be a ring, let 0 ⟶ M′ ⟶ M ⟶ M′′ ⟶ 0 be an exact sequence of R-modules, and let I be an ideal in R. Prove that there is an induced exact sequence of R-modules

0 ⟶ 0 :_{M′} I^{∞} ⟶ 0 :_{M} I^{∞} ⟶ 0 :_{M′′} I^{∞}

and give an example in which the induced map 0 :_{M} I^{∞} ⟶ 0 :_{M′′} I^{∞} is not surjective.

Exercise 8. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let I = (f_{1}, …, f_{s}) be an ideal in P , and let g ∈ P \ {0}. Write a CoCoA function which implements the algorithm for checking whether g ∈ \sqrt{I} holds provided by Corollary 3.5.15.

Exercise 9. Let K be a field and P = K[x_{1}, …, x_{5}]. Consider the two matrices

A = ( \begin{matrix}x_{1} & x_{2} & x_{3} \\ x_{2} & x_{4} & x_{5} \end{matrix} )  and  B = ( \begin{matrix}x_{1} & x_{2} & x_{3} \\ x_{2} & x_{4} & x_{5} \\ x_{3} & x_{5} & 0 \end{matrix} )

Let d_{1} = x_{2}x_{5} − x_{3}x_{4} , d_{2} = x_{2}x_{3} − x_{1}x_{5} , and d_{3} = x_{1}x_{4} − x_{2}^{2} be the 2 × 2-minors of A, and let d be the determinant of B. For I = (d_{1}, d_{2}, d_{3}) and J = (d_{3}, d), show that \sqrt{I} = \sqrt{J}.

Tutorial 37: Computation of Saturations

In this tutorial we ask you to implement the algorithms for computing saturations which we explained above. Furthermore, we want to study possible improvements of these algorithms.

Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let I ⊆ P be an ideal which is generated by a set of polynomials {f_{1}, …, f_{s}}, and let M and N be two P -submodules of P^{r}. a) Write a CoCoA function Sat1(…) which implements the method of

Proposition 3.5.9 for computing N :_{M} I^{∞}. In order to find the colon modules N :_{M} I^{i}, implement the method of Proposition 3.4.9.b in a CoCoA function ElimColon(…).

b) Apply your function Sat1(…) to compute the saturation N :_{M} I^{∞} in the following cases.

1) I = (x, y, z), N = (x + y − 3z, y^{2} − 3yz + 2z^{2}) ∩ (x, y, z)^{4} , M = (1) in ℚ[x, y, z]

2) I = (x − y), N = ⟨xye_{1}, x^{2}e_{1}, y^{2}e_{2}⟩, M = ⟨xye_{1}, xye_{2}⟩ in ℚ[x, y]^{2} 3) I = (x, y + z), N = ⟨(yz − 2z^{2})e_{1}, (y^{2} − 4z^{2})e_{2}, (xz − z^{2})e_{2},

(x^{2} − z^{2})e_{3}⟩, M = ⟨xe_{1}, ye_{2}, ze_{3}⟩ in ℚ[x, y, z]^{3}

c) Implement the method of Theorem 3.5.13.a,b for computing N :_{M} I^{∞} in a CoCoA function Sat2(…) and apply it to the cases given in b).

d) Implement the method of Theorem 3.5.13.c for computing N :_{M} I^{∞} in a CoCoA function Sat3(…) and apply it to the cases given in b).

e) Let I = (f) be a non-zero principal ideal, and let v ∈ N :_{M} I^{∞}. Describe two different ways how one can find an integer i ≥ 0 such that f^{i}v ∈ N. Hint: One method uses Proposition 3.5.9, and the other one follows from the proof of Theorem 3.5.13.a.

f) Let I be again an arbitrary ideal in P. Use your answers of e) to write two CoCoA functions RadPower1(…) and RadPower2(…) which find for every polynomial f ∈ \sqrt{I} an integer i ≥ 0 such that f^{i} ∈ I. Apply your functions in the following cases.

1) I = (x^{3}, y^{3}, z^{3}), f = x + y + z in ℚ[x, y, z]

2) I = (x_{1}x_{4}−x_{2}^{2}, x_{2}x_{5}−x_{3}x_{4}, x_{1}x_{5}−x_{2}x_{3}), f = x_{1}x_{5}^{2}−2x_{2}x_{3}x_{5}+x_{3}^{2}x_{4}

in ℚ[x_{1}, …, x_{5}]

g) Prove the formula

N :_{M} (f_{1} ⋯ f_{s})^{∞} = (⋯ ((N :_{M} (f_{1})^{∞}) :_{M} (f_{2})^{∞}) ⋯) :_{M} (f_{s})^{∞}

h) Use g) to write a CoCoA function SatIndets(…) which takes an ideal I in P and computes I :_{P} (x_{1} ⋯ x_{n})^{∞}. Apply this function in the following cases.

1) I = (x_{1}^{7} − x_{2}^{2}x_{3}, x_{1}^{4}x_{4} − x_{2}^{3}) in ℚ[x_{1}, …, x_{4}]

2) I = (x_{1}x_{2}x_{3} − x_{4}x_{5}x_{6}, x_{5}x_{7} − x_{1}x_{2}x_{6}) in ℚ[x_{1}, …, x_{7}]

3) I = (x_{2}x_{4}−x_{6}x_{8}, x_{2}x_{8}^{2}−x_{4}^{3}, x_{1}x_{3}−x_{5}x_{7}, x_{1}^{2}x_{7}−x_{3}^{2}x_{5}) in ℚ[x_{1}, …, x_{8}]

i) Let g_{1}, …, g_{t} be further polynomials in P. Suppose that J is an ideal in P which contains the polynomial f_{1} ⋯ f_{s} − g_{1} ⋯ g_{t}. Then prove the formula

J :_{P} (f_{1} ⋯ f_{s} · g_{1} ⋯ g_{t})^{∞} = J :_{P} (f_{1} ⋯ f_{s})^{∞}

Tutorial 38: Toric Ideals

In Tutorial 36, we found a solution of the integer programming problem IP(A, b, C), where A = (a_{ij}) ∈ Mat_{m,n}(ℕ), b = (b_{1}, …, b_{m}) ∈ ℕ^{m}, and C : ℕ^{n} ⟶ ℕ is a non-zero linear function. Since the integer programming problem has many practical applications, it is important to solve it as efficiently as possible. Let us discuss our earlier solution in this respect.

The main step was to consider the terms t_{i} = y_{1}^{a_{1i}} ⋯ y_{m}^{a_{mi}} for all i = 1, …, n, and to form the binomial ideal J = (x_{1} − t_{1}, …, x_{n} − t_{n}) in K[x_{1}, …, x_{n}, y_{1}, …, y_{m}], where K is a field. Then we had to compute the Gröbner basis of the ideal J with respect to an elimination ordering for {y_{1}, …, y_{m}}. Unfortunately, this computation is, in general, rather inefficient.

Let P = K[x_{1}, …, x_{n}]. The ideal I = J ∩ P is called the toric ideal associated to the matrix A. In this tutorial, we want to search for another way to compute I and to study possibilities for applying this method to optimize the solution of the integer programming problem. By S, we denote again the system of Diophantine equations

\{ \begin{matrix}a_{11}z_{1} + a_{12}z_{2} + ⋯ + a_{1n}z_{n} & = & b_{1} \\ a_{21}z_{1} + a_{22}z_{2} + ⋯ + a_{2n}z_{n} & = & b_{2} \\ ⋮ & ⋮ & ⋮ \\ a_{m1}z_{1} + a_{m2}z_{2} + ⋯ + a_{mn}z_{n} & = & b_{m} \end{matrix}

a) Let (α_{1}, …, α_{n}) ∈ ℕ^{n} be a solution of S, let σ be a cost-compatible term ordering on 𝕋(x_{1}, …, x_{n}), and let (β_{1}, …, β_{n}) ∈ ℕ^{n} be such that x_{1}^{β_{1}} ⋯ x_{n}^{β_{n}} = NF_{σ,I}(x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}). Prove that (β_{1}, …, β_{n}) is a solution of the integer programming problem IP(A, b, C). Thus we can try to solve IP(A, b, C) as follows. First we find a solution

(α_{1}, …, α_{n}) of the system S, for instance by an exhaustive search or as in Tutorial 36.k. Then we find a system of generators of I. Next, we choose a cost-compatible term ordering σ on 𝕋(x_{1}, …, x_{n}). Finally, we calculate a σ -Gröbner basis of I and NF_{σ,I}(x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}).

Computationally, the most expensive step in this procedure is the second one, i.e. the determination of a system of generators of I. Let us implement a reference function against which we can judge possible optimizations.

b) Write a CoCoA function Toric1(…) which takes the matrix A and computes the toric ideal I = J ∩P associated to A via the built-in command Elim(…).

c) Apply your function Toric1(…) in the following cases. Each time, measure the execution time using Time.

1) A_{1} = ( \begin{matrix}3 & 1 & 11 & 2 & 3 & 5 & 3 & 5 \\ 4 & 5 & 0 & 1 & 7 & 4 & 6 & 2 \\ 5 & 6 & 1 & 9 & 2 & 3 & 3 & 1 \end{matrix} )

2) A_{2} = ( \begin{matrix}1 & 4 & 9 & 5 & 8 & 7 & 3 & 3 & 6 & 7 \\ 1 & 6 & 2 & 4 & 4 & 1 & 2 & 4 & 0 & 4 \\ 4 & 3 & 4 & 4 & 3 & 6 & 6 & 5 & 2 & 9 \\ 3 & 1 & 9 & 6 & 9 & 7 & 1 & 9 & 2 & 9 \\ 9 & 7 & 0 & 6 & 3 & 9 & 2 & 0 & 8 & 4 \end{matrix} )

3) A_{3} = (\begin{matrix}4 & 3 & 3 & 3 & 2 & 2 & 2 & 2 & 2 & 2 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 2 & 1 & 1 & 0 & 0 & 0 & 3 & 2 & 2 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 4 & 3 \\ 0 & 0 & 1 & 0 & 0 & 1 & 0 & 2 & 1 & 0 & 0 & 1 & 0 & 2 & 1 & 0 & 3 & 2 & 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 2 & 0 & 0 & 1 & 0 & 1 & 2 & 0 & 1 & 2 & 3 & 0 & 0 \end{matrix}

\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 3 & 2 & 2 & 2 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 2 & 0 & 1 & 3 & 2 & 1 & 0 & 4 & 3 & 2 & 1 & 0 \\ 1 & 0 & 1 & 2 & 0 & 1 & 2 & 3 & 0 & 1 & 2 & 3 & 4 \end{matrix} )

Now we consider the homogeneous system of Diophantine equations associated to S and denote it by S_{0} .

\{ \begin{matrix}a_{11}z_{1} + a_{12}z_{2} + ⋯ + a_{1n}z_{n} & = & 0 \\ a_{21}z_{1} + a_{22}z_{2} + ⋯ + a_{2n}z_{n} & = & 0 \\ ⋮ & ⋮ & ⋮ \\ a_{m1}z_{1} + a_{m2}z_{2} + ⋯ + a_{mn}z_{n} & = & 0 \end{matrix}

Let L ⊆ ℤ^{n} be the set of integer solutions of S_{0} . A subset of ℤ^{n} is called a lattice in ℤ^{n} if it is a free ℤ-submodule.

d) Show that L is a lattice of rank n − rk(A) in ℤ^{n}.

e) Prove that the following construction yields a map φ : L ⟶ I which is well-defined. A tuple (α_{1}, …, α_{n}) ∈ L can be uniquely written as (max(α_{1}, 0), …, max(α_{n}, 0))−(max(−α_{1}, 0), …, max(−α_{n}, 0)). Then we define

φ(α_{1}, …, α_{n}) = x_{1}^{max(α_{1},0)} ⋯ x_{n}^{max(α_{n},0)} − x_{1}^{max(−α_{1},0)} ⋯ x_{n}^{max(−α_{n},0)}

Hint: Use I = J ∩ P and a technique similar to Tutorial 36.g.

f) Conversely, let x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}} −x_{1}^{β_{1}} ⋯ x_{n}^{β_{n}} ∈ I for some tuples (α_{1}, …, α_{n}), (β_{1}, …, β_{n}) ∈ ℕ^{n}. Prove that (α_{1} − β_{1}, …, α_{n} − β_{n}) ∈ L.

g) Let L = K[x_{1}, …, x_{n}, x_{1}^{−1}, …, x_{n}^{−1}] be the ring of Laurent polynomials introduced in Tutorial 36. Describe an explicit isomorphism of K -alge-bras P_{x_{1}···x_{n}} ≅ L.

h) Let r = rk(L) = n − rk(A) > 0, and let {v_{1}, …, v_{r}} ⊆ L be a ℤbasis of L. The ideal I_{L} = (φ(v_{1}), …, φ(v_{r})) is called the lattice ideal associated to L. Show that I_{L} · P_{x_{1}···x_{n}} = I · P_{x_{1}···x_{n}} and conclude that

I = I_{L} :_{P} (x_{1} ⋯ x_{n})^{∞}

Hint: First show that I_{L} ⊆ I by using e) and that I is a prime ideal. If α = (α_{1}, …, α_{n}) is of the form α = ∑_{i=1}^{r} c_{i}v_{i}, write φ(α) = x^{α^{+}} − x^{α^{−}} and expand x^{α^{+}}/x^{α^{−}} − 1 into a product. i) Use h) to write a CoCoA function Toric2(…) which takes the matrix A

and computes its associated toric ideal I. For the computation of the saturation, apply the function SatIndets(…) of Tutorial 37.h. Hint: Use the CoCoA function LinKer(…) at least eight times to get different ℤ-bases of L. (The function LinKer(…) is not deterministic.) In this way, produce many generators of I_{L}.

j) Calculate the toric ideals associated to the matrices in part c) using Toric2(…) and Time how long it takes.

k) Explain how one can use Tutorial 37.i to avoid some saturations with respect to certain indeterminates in the function Toric2(…). Write a CoCoA function Toric3(…) which implements this optimization.

l) Apply your function Toric3(…) in the cases of c), measure its execution times again, and compare the result with your previous timings.

3.6 Homomorphisms of Algebras

He who asks questions cannot avoid the answers. (Cameroon Proverb)

In Subsection 3.3.A we examined homomorphisms between finitely generated modules over an affine algebra P/I, where P = K[x_{1}, …, x_{n}] is a polynomial ring over a field K and I ⊆ P is an ideal. We answered the question of how to compute presentations for the kernel and the image of such a homomorphism. Now we ask the same questions for K -algebra homomorphisms.

So, let P′ = K[y_{1}, …, y_{m}] be another polynomial ring, and let I′ ⊆ P′ be an ideal. How can we compute the kernel of a K -algebra homomorphism φ : P/I ⟶ P′/I′? Our earlier results are not applicable, because P′/I′ is in general not a finitely generated P/I -module. Therefore we need a different approach. Fortunately, the elimination techniques introduced in Section 3.4 come to our rescue. We embed both P and P′ into the larger polynomial ring Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{m}] and form J = I′Q+(x_{1}−f_{1}, …, x_{n}−f_{n}), where f_{i} ∈ P′ are chosen such that f_{i} +I′ = φ(x_{i} +I) for i = 1, …, n. Then Ker(φ) is simply the residue class ideal of the elimination ideal J ∩ P.

A number of other questions can be reformulated as questions about the kernels of suitable K -algebra homomorphisms. For example, we can solve the implicitization problem which asks for the ideal of algebraic relations among a given set of polynomials.

Another application is the possibility to perform the following task. Let us consider the affine ℚ-algebra ℚ[x, y]/(x^{2} + 2xy + y^{2} + 1), and let us denote by \overline{x} and \overline{y} the residue classes of x and y. Clearly, the element \overline{x} + \overline{y} satisfies an algebraic equation, namely (\overline{x} + \overline{y})^{2} + 1 = 0. Such an element is called algebraic over ℚ. On the other hand, the element \overline{x} does not satisfy an algebraic equation. It is called transcendental over ℚ. Given an affine K -algebra and an element in it, it is possible to decide whether the element is transcendental or algebraic, and in the latter case to find its minimal polynomial over K (see Corollary 3.6.4).

Then we turn our attention to the study of the image of a K -algebra homomorphism φ : P/I ⟶ P′/I′. Proposition 3.6.6 allows us to check whether or not a given element of P′/I′ is contained in the image of φ. In the first case, we show how one can represent it explicitly using the generators of Im(φ). The set Im(φ) is an affine K -algebra itself and will be presented using generators and relations. Another beautiful application of our elimination techniques is the possibility to decide whether φ is surjective just by looking at the shape of a particular Gröbner basis.

In the last part, this result is extended and sharpened for homomorphisms φ : P ⟶ P′ of polynomial rings over K. Once more the full power of reduced Gröbner bases shows up. In particular, we explain how the shape of a suitable reduced Gröbner basis allows us to compute an explicit right inverse homomorphism if φ is surjective (see Proposition 3.6.9). Finally, we get a very explicit characterization of K -algebra automorphisms of P (see Proposition 3.6.12).

Several times in this section an interesting phenomenon occurs. We start with a fairly simple, innocent looking example and ask a straightforward question: what happens if we apply the theoretical results in this concrete case? Sometimes the answer can be much more complicated than we would ever have imagined. And we would not be surprised if, when you try your own examples using CoCoA, the answer fills screen after screen. Such is life!

In Section 1.1 we introduced evaluation homomorphisms on polynomial rings. Evaluation homomorphisms of the type ψ : R[x_{1}, …, x_{n}] ⟶ R were also called substitution homomorphisms. Since we want to study algebra homomorphisms in this section, the following facts about substitution homomorphisms will come in handy.

Proposition 3.6.1. Let R be a ring, let R[x_{1}, …, x_{n}] be a polynomial ring over R, let f_{1}, …, f_{n} ∈ R, and let ψ : R[x_{1}, …, x_{n}] ⟶ R be the substitution homomorphism defined by ψ(x_{i}) = f_{i} for i = 1, …, n.

a) The kernel of ψ is the ideal (x_{1} − f_{1}, …, x_{n} − f_{n}) in R[x_{1}, …, x_{n}].

b) For every g ∈ R[x_{1}, …, x_{n}], there exist h_{1}, …, h_{n} ∈ R[x_{1}, …, x_{n}] such

that

g = ∑_{i=1}^{n} h_{i} (x_{i} − f_{i}) + g(f_{1}, …, f_{n})

Proof. Obviously, claim b) implies a). Given g ∈ R[x_{1}, …, x_{n}], we apply the R-algebra homomorphism ϑ : R[x_{1}, …, x_{n}] ⟶ R[x_{1}, …, x_{n}] defined by ϑ(x_{i}) = x_{i} + f_{i} for i = 1, …, n. Then we write ϑ(g) in the form

ϑ(g) = g(x_{1} + f_{1}, …, x_{n} + f_{n}) = ∑_{i=1}^{n} h̃_{i} x_{i} + r

where h̃_{1}, …, h̃_{n} ∈ R[x_{1}, …, x_{n}] and r ∈ R. By applying the substitution homomorphism x_{i} ↦ 0 for i = 1, …, n to both sides of this equation, we see that r = g(f_{1}, …, f_{n}).

Clearly, the R-algebra homomorphism ϑ′ : R[x_{1}, …, x_{n}] ⟶ R[x_{1}, …, x_{n}] defined by ϑ′(x_{i}) = x_{i} − f_{i} for i = 1, …, n is inverse to ϑ. When we apply it to the above equation, we get g = ϑ′(ϑ(g)) = ∑_{i=1}^{n} ϑ′(h̃_{i})(x_{i} − f_{i}) + g(f_{1}, …, f_{n}). By setting h_{i} = ϑ′(h̃_{i}) for i = 1, …, n, we obtain the desired result. □

For the remainder of this section, we let K be a field, and we suppose that P = K[x_{1}, …, x_{n}] and P′ = K[y_{1}, …, y_{m}] are two polynomial rings containing proper ideals I ⊂ P and I′ ⊂ P′. Then a K -algebra homomorphism

φ : P/I ⟶ P′/I′

is determined by polynomials f_{1}, …, f_{n} ∈ P′ such that φ(x_{i} + I) = f_{i} + I′ for i = 1, …, n. We can view P′/I′ as a P/I -algebra via φ by letting (f + I) · (g + I′) = φ(f + I) · (g + I′) for f ∈ P and g ∈ P′. But as one can easily see, the P/I -module P′/I′ is in general not finitely generated, so that the previous results on modules cannot be used for computing presentations of the P -modules Ker(φ) and Im(φ). Instead, we are now going to provide other effective methods for this purpose.

Proposition 3.6.2. (Kernels of K-Algebra Homomorphisms) Let φ : P/I ⟶ P′/I′ be a K -algebra homomorphism which is given by φ(x_{i} + I) = f_{i} + I′ for i = 1, …, n. We form the polynomial ring Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{m}] and the ideal J = I′Q + (x_{1} − f_{1}, …, x_{n} − f_{n}). Then Ker(φ) is the image of the ideal J ∩ P in P/I.

Proof. Let g ∈ P be a polynomial such that g + I ∈ Ker(φ). Then the equality φ(g + I) = g(f_{1}, …, f_{n}) + I′ = 0 implies g(f_{1}, …, f_{n}) ∈ I′. If we consider h = g − g(f_{1}, …, f_{n}) ∈ Q as a polynomial with coefficients in P′ and indeterminates x_{1}, …, x_{n}, we have h(f_{1}, …, f_{n}) = 0. Therefore Proposition 3.6.1.a implies that h is in the ideal generated by {x_{1}−f_{1}, …, x_{n}−f_{n}} in Q. In particular, we get g = g(f_{1}, …, f_{n}) + h ∈ J ∩ P.

Conversely, let g ∈ J ∩ P, and let {h_{1}, …, h_{s}} ⊆ P′ be a system of generators of I′. Since we have g ∈ J, we can represent g in the form g = ∑_{i=1}^{s} g_{i}h_{i} + ∑_{j=1}^{n} k_{j}(x_{j} − f_{j}) with polynomials g_{i}, k_{j} ∈ Q. Now we substitute x_{i} ⟼ f_{i} for i = 1, …, n in this representation, and we get g(f_{1}, …, f_{n}) = ∑_{i=1}^{s} g_{i}(f_{1}, …, f_{n}, y_{1}, …, y_{m})h_{i} ∈ I′. Therefore we obtain φ(g + I) = g(f_{1}, …, f_{n}) + I′ = 0, as claimed. □

In the introduction of the previous section we mentioned the implicitization problem. Given polynomials f_{1}, …, f_{n} ∈ P′, it asks how one can find the ideal of algebraic relations among them. This problem can be solved by applying the preceding proposition in the case I = (0) and I′ = (0).

Corollary 3.6.3. (Implicitization) Given polynomials f_{1}, …, f_{n} ∈ P′, we define a K -algebra homomorphism φ : P ⟶ P′ by φ(x_{i}) = f_{i} for i = 1, …, n. In K[x_{1}, …, x_{n}, y_{1}, …, y_{m}], we consider the ideal J = (x_{1} − f_{1}, …, x_{n} − f_{n}). Then the ideal of algebraic relations among f_{1}, …, f_{n} is given by

Ker(φ) = J ∩ P

Another application of the previous proposition is the possibility to check whether an element of an affine K -algebra is algebraic or transcendental over K, and to compute its minimal polynomial in the first case.

Corollary 3.6.4. (Minimal Polynomials) Let I be an ideal in P, let R be the affine K -algebra R = P/I, and let \overline{f} ∈ R \ \{0\} be the residue class of a polynomial f ∈ P. We consider a new indeterminate y and form the ideal J = I · P [y] + (y − f) in the polynomial ring P [y].

a) The element \overline{f} ∈ R is transcendental over K if and only if we have J ∩ K[y] = (0).

b) If the element \overline{f} ∈ R is algebraic over K, then any generating polynomial of the elimination ideal J ∩ K[y] is a minimal polynomial of \overline{f} over K.

Proof. Both claims follow from the proposition. We observe that \overline{f} is transcendental over K if and only if the kernel of the K -algebra homomorphism K[y] ⟶ R defined by y ↦ \overline{f} is trivial. If this kernel is non-trivial, the minimal polynomial of \overline{f} over K generates it. □

Example 3.6.5. Consider the affine ℚ-algebra R = ℚ[x]/(x^{7} − x − 1). The polynomial x^{7} − x − 1 is irreducible over ℚ. Therefore R is a field. The residue class of the polynomial f = x^{6} − 9x^{5} + x + 11 in R has the minimal polynomial

y^{7}−83 y^{6}+2999 y^{5}−61029 y^{4}+726440 y^{3}−4538196 y^{2}−9285526 y+22670839

over ℚ. To check this, we have to form the ideal J = (x^{7} − x − 1, y − f) in ℚ[x, y] and to compute J ∩ ℚ[y]. In spite of the apparent simplicity of the question, the answer shows that you should not try to calculate this by hand. Of course, CoCoA does it in a split-second!

Next we want to study the image of φ : P/I ⟶ P′/I′. Clearly, Im(φ) is the K -subalgebra of P′/I′ generated by f_{1} + I′, …, f_{n} + I′. In particular, it is an affine K -algebra. (In Example 2.6.4 we saw that, in general, subalgebras of affine K -algebras need not be affine algebras.) Moreover, we recall from above that P′/I′ is, in general, not a finitely generated module over its subalgebra Im(φ).

This leads us to a number of questions. How can we decide effectively whether a given residue class of P′/I′ lies in Im(φ)? And if it does, how can we represent it using the generators of that K -algebra? How can we check whether φ is surjective? How can we find an explicit presentation of Im(φ) as a K -algebra? These questions are answered by the following proposition.

Proposition 3.6.6. (Images of K-Algebra Homomorphisms) Let φ : P/I ⟶ P′/I′ be a K -algebra homomorphism which is given by φ(x_{i} + I) = f_{i} + I′ for i = 1, …, n. We form the polynomial ring Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{m}] and the ideal J = I′Q + (x_{1} − f_{1}, …, x_{n} − f_{n}), and we let σ be an elimination ordering for {y_{1}, …, y_{m}}. Furthermore, we let G = {g_{1}, …, g_{s}} be the reduced σ -Gröbner basis of J, and we assume that G ∩ P = {g_{1}, …, g_{t}} for some t ≤ s.

a) For a polynomial g ∈ P′, we have g + I′ ∈ Im(φ) if and only if we have NF_{σ,J}(g) ∈ P. (For the computation of this normal form, we view g as an element of Q.) b) If a polynomial g ∈ P′ satisfies h = NF_{σ,J}(g) ∈ P, then the equation

g+I′ = h(f_{1}, …, f_{n})+I′ provides an explicit representation of its residue class as an element of Im(φ).

c) The affine K -algebra Im(φ) has the presentation

Im(φ) ≅ K[x_{1}, …, x_{n}]/(g_{1}, …, g_{t})

d) The K -algebra homomorphism φ : P/I ⟶ P′/I′ is surjective if and only if G contains elements of the form y_{i} − h_{i}, where h_{i} ∈ P for i = 1, …, m.

Proof. By applying the Division Algorithm 1.6.4 and Corollary 2.4.9.a, we obtain a representation

g = q_{1}g_{1} + ⋯ + q_{s}g_{s} + NF_{σ,J}(g)

with q_{1}, …, q_{s} ∈ Q. If we have NF_{σ,J}(g) ∈ P here, we substitute x_{i} ↦ f_{i} for i = 1, …, n. Since g_{1}, …, g_{s} are contained in J, they yield elements of I′ under this substitution. Hence we get g − (NF_{σ,J}(g))(f_{1}, …, f_{n}) ∈ I′. This proves b) and the implication “⇐” of a).

Now we assume that g ∈ P′ satisfies g + I′ ∈ Im(φ). We want to show NF_{σ,J}(g) ∈ P. By assumption, there exists a polynomial h ∈ P such that we have g +I′ = φ(h+I) = h(f_{1}, …, f_{n})+I′. Since g −h(f_{1}, …, f_{n}) ∈ I′Q ⊆ J and h − h(f_{1}, …, f_{n}) ∈ (x_{1} − f_{1}, …, x_{n} − f_{n}) ⊆ J by Proposition 3.6.1.b, the polynomials g, h, and h(f_{1}, …, f_{n}) have the same normal form by Proposition 2.4.10.a. Using the fact that σ is an elimination ordering for {y_{1}, …, y_{m}}, we see that h ∈ P implies NF_{σ,J}(g) = NF_{σ,J}(h(f_{1}, …, f_{n})) = NF_{σ,J}(h) ∈ P. Thus also the implication “⇒” of a) holds.

Next we prove c). By Theorem 3.4.5, the ideal (g_{1}, …, g_{t}) is precisely the elimination ideal J ∩ P, which in turn maps to Ker(φ) in P/I by Proposition 3.6.2. Thus we have Im(φ) ≅ (P/I)/ Ker(φ) ≅ P/(J ∩ P) = P/(g_{1}, …, g_{t}).

Finally, we prove d). Suppose that φ is surjective. Let i ∈ {1, …, m}. As y_{i} + I′ ∈ Im(φ), part a) yields h_{i} = NF_{σ,J}(y_{i}) ∈ P. Thus we have y_{i} − h_{i} = y_{i} − NF_{σ,J}(y_{i}) ∈ J. Since LM_{σ}(y_{i} − h_{i}) = y_{i}, the polynomial y_{i} − h_{i} is monic. Moreover, Q/J ≅ P′/I′ shows that J is a proper ideal of Q. Thus y_{i} is a minimal generator of LT_{σ}(J). The reduced σ -Gröbner basis of J has to contain an element of the form y_{i} −k_{i}, where k_{i} ∈ P. Since both h_{i} and k_{i} are irreducible and (y_{i} − h_{i}) − (y_{i} − k_{i}) = k_{i} − h_{i}, it follows that h_{i} = k_{i}, i.e. that the polynomial y_{i} − h_{i} is contained in the reduced σ -Gröbner basis of J.

Conversely, let G be the reduced σ -Gröbner basis of J. If y_{i} −h_{i} ∈ G for some i ∈ {1, …, m}, then we have h_{i} = NF_{σ,J}(y_{i}), and therefore a) shows y_{i} + I′ ∈ Im(φ). □

In Tutorial 41.c you can see a discussion of the generalization of part c) of this proposition to the case of subalgebras generated by rational functions.

As in Corollary 3.6.3, we now restrict our attention to the case I = I′ = 0, i.e. the case of homomorphisms of polynomial rings over K. In this case, parts a) and b) of the proposition specialize to the following result.

Corollary 3.6.7. (Subalgebra Membership Test) Let f_{1}, …, f_{n} ∈ P′, let S = K[f_{1}, …, f_{n}] be the K-subalgebra of P′ generated by {f_{1}, …, f_{n}}, let J = (x_{1}−f_{1}, …, x_{n}−f_{n}) ⊆ K[x_{1}, …, x_{n}, y_{1}, …, y_{m}], and let σ be an elimination ordering for {y_{1}, …, y_{m}}.

Then a polynomial g ∈ P′ is contained in the subalgebra S if and only if NF_{σ,J}(g) ∈ P. In this case, if we let h = NF_{σ,J}(g), then g = h(f_{1}, …, f_{n}) is an explicit representation of g as an element of S.

As an application of this corollary, we can compute the representation of a symmetric polynomial in terms of elementary symmetric polynomials discussed in Tutorial 12 in a different way.

Example 3.6.8. In Tutorial 12 we proved that the elementary symmetric polynomials s_{1}, …, s_{n} generate the K -subalgebra of all symmetric polynomials in P′ = K[y_{1}, …, y_{n}]. We define a K -algebra homomorphism φ : K[x_{1}, …, x_{n}] ⟶ P′ by mapping x_{i} to s_{i} for i = 1, …, n. Then we form the ideal J = (x_{1} − s_{1}, …, x_{n} − s_{n}) in the polynomial ring Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{n}]. By the corollary, we can compute the representation of a symmetric polynomial f ∈ P′ in terms of the elementary symmetric polynomials by calculating the normal form NF_{σ,J}(f) and substituting x_{i} ↦ s_{i} for i = 1, …, n.

For surjective homomorphisms φ : P ⟶ P′, we can strengthen Proposition 3.6.6.d as follows.

Proposition 3.6.9. (Surjective K-Algebra Homomorphisms Between Polynomial Rings) Let φ : P ⟶ P′ be a surjective K -algebra homomorphism which is given by φ(x_{i}) = f_{i} for i = 1, …, n. In the ring Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{m}], we consider the ideal J = (x_{1} − f_{1}, …, x_{n} − f_{n}). Let σ be an elimination ordering for {y_{1}, …, y_{m}}.

a) There exist polynomials h_{1}, …, h_{m}, g_{1}, …, g_{s} ∈ P such that the reduced σ -Gröbner basis of J is {y_{1} − h_{1}, …, y_{m} − h_{m}, g_{1}, …, g_{s}}.

b) The set {g_{1}, …, g_{s}} is the reduced Gröbner basis of Ker(φ) with respect to the term ordering obtained by restricting σ to 𝕋(x_{1}, …, x_{n}).

c) The homomorphism ψ : P′ → P defined by ψ(y_{i}) = h_{i} for i = 1, …, m is a right inverse of φ, i.e. we have φ ∘ ψ = id_{P′}.

Proof. First we prove a). Since φ is surjective, Proposition 3.6.6.d shows that the reduced σ -Gröbner basis G of J contains elements of the form y_{i} − h_{i}, where h_{i} ∈ P for i = 1, …, m. Let g be another element in G. Since the Gröbner basis is reduced, the term LT_{σ}(g) is not divisible by any indeterminate in {y_{1}, …, y_{m}}. Therefore we have LT_{σ}(g) ∈ P. We know that σ is an elimination ordering for {y_{1}, …, y_{m}}. Hence LT_{σ}(g) ∈ P implies g ∈ P, and a) is proved.

Claim b) follows from Proposition 3.6.2 and Theorem 3.4.5.c. To prove c), it suffices to show that y_{i} = h_{i}(f_{1}, …, f_{n}) for i = 1, …, m. Let u_{i} = y_{i} − h_{i} for i = 1, …, m. Consider u_{i} as a polynomial in P′[x_{1}, …, x_{n}]. Since we have u_{i} ∈ J = (x_{1} − f_{1}, …, x_{n} − f_{n}), it is clear that u_{i}(f_{1}, …, f_{n}) = 0. This means y_{i} − h_{i}(f_{1}, …, f_{n}) = 0 for i = 1, …, m, as we wanted to show. □

The following example shows how one can apply this proposition in practice.

Example 3.6.10. Using the rings P = ℚ[x_{1}, x_{2}, x_{3}] and P′ = ℚ[y_{1}, y_{2}], we let φ : P → P′ be the ℚ-algebra homomorphism which is defined by φ(x_{1}) = \frac{1}{5}y_{1} + y_{2}^{4} , φ(x_{2}) = 2y_{1}^{2} + y_{2} , and φ(x_{3}) = \frac{1}{3}y_{2} . We compute the reduced Gröbner basis of the ideal J = (x_{1}− \frac{1}{5}y_{1}−y_{2}^{4}, x_{2}−2y_{1}^{2}−y_{2}, x_{3}− \frac{1}{3}y_{2}) with respect to an elimination ordering for {y_{1}, y_{2}}. Using CoCoA, we get \{y_{1} − 5x_{1} + 405x_{3}^{4}, y_{2} − 3x_{3}, x_{3}^{8} − \frac{2}{81}x_{1}x_{3}^{4} + \frac{1}{6561}x_{1}^{2} − \frac{1}{328050}x_{2} + \frac{1}{109350}x_{3}\}.

Thus Proposition 3.6.6.d shows that φ is surjective, Proposition 3.6.9.b shows Ker(φ) = (x_{3}^{8} − \frac{2}{81}x_{1}x_{3}^{4} + \frac{1}{6561}x_{1}^{2} − \frac{1}{328050}x_{2} + \frac{1}{109350}x_{3}), and Proposition 3.6.9.c shows that a right inverse of φ is given by the ℚ-algebra homomorphism ψ : P′ → P defined by ψ(y_{1}) = −405x_{3}^{4} + 5x_{1} and ψ(y_{2}) = 3x_{3} .

Our last topic in this section is the computational treatment and characterization of bijective K -algebra homomorphisms. In Volume 2, we shall see that a surjective K -algebra homomorphism φ : P ⟶ P′ can only exist if n ≥ m. If φ is bijective, then it is easy to check that also the inverse map φ^{−1} : P′ ⟶ P is a K -algebra homomorphism. Thus, if φ is bijective, we must have n = m. Hence the map φ is a K -algebra automorphism of P in this case, i.e. a K -algebra homomorphism φ : P ⟶ P such that there exists a K -algebra homomorphism ψ : P ⟶ P which satisfies ψ ∘ φ = id_{P} and φ ∘ ψ = id_{P} .

The following lemma shows that surjective K -algebra homomorphisms φ : P ⟶ P are already K -algebra automorphisms.

Lemma 3.6.11. Let R be a Noetherian ring, and let φ : R ⟶ R be a ring homomorphism. Then the following conditions are equivalent.

a) The map φ is surjective.

b) The map φ is bijective.

Proof. It suffices to show “a)⇒b)”. For every i ≥ 1, we obviously have Ker(φ^{i}) ⊆ Ker(φ^{i+1}). Since R is a Noetherian ring, there exists a number j ∈ ℕ such that Ker(φ^{i}) = Ker(φ^{j}) for all i ≥ j. Now let r ∈ Ker(φ). The surjectivity of φ implies the surjectivity of φ^{j}. Hence there exists an element r′ ∈ R such that r = φ^{j}(r′). Then 0 = φ(r) = φ^{j+1}(r′) implies r′ ∈ Ker(φ^{j+1}) = Ker(φ^{j}), and therefore r = φ^{j}(r′) = 0. Consequently, the map φ is injective. □

By combining the preceding results, we can characterize K -algebra automorphisms of P as follows.

Proposition 3.6.12. (Automomorphisms of Polynomial Rings) Let P = K[x_{1}, …, x_{n}], and let φ : P ⟶ P be a K -algebra homomorphism given by φ(x_{i}) = f_{i} for i = 1, …, n. Furthermore, let Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{n}], let J = (x_{1}−f_{1}(y_{1}, …, y_{n}), …, x_{n}−f_{n}(y_{1}, …, y_{n})), and let σ be an elimination ordering for {y_{1}, …, y_{n}}. Then the following conditions are equivalent.

a) The map φ is a K -algebra automorphism of P.

b) The homomorphism φ is surjective.

c) There exist polynomials h_{1}, …, h_{n} ∈ P such that the reduced σ -Gröbner basis of J is {y_{1} − h_{1}, …, y_{n} − h_{n}}. If these conditions hold, the K -algebra homomorphism ψ : P → P defined

by ψ(x_{i}) = h_{i} for i = 1, …, n is the inverse of φ, i.e. we have ψ = φ^{−1} .

Proof. The equivalence of a) and b) is a special case of Lemma 3.6.11. By Proposition 3.6.9, condition a) implies c). Given c), we can apply Proposition 3.6.6.d to conclude that φ is surjective. By Lemma 3.6.11, it is then an isomorphism of K -algebras. Since Proposition 3.6.9.c shows that ψ is a right inverse of φ, it is the inverse of φ. □

Once again, we can take a concrete K -algebra automorphism of P and ask for a computation of its inverse. But even if we start with a fairly simple map, the size and the intricacy of the answer may surprise us.

Example 3.6.13. Using the polynomial ring P = ℚ[x_{1}, x_{2}, x_{3}], let us consider the two ℚ-algebra homomorphisms

\begin{aligned}ψ_{1} : & P & ⟶ & P \\ & x_{1} & ⟼ & x_{1} \\ & x_{2} & ⟼ & x_{2} + x_{1}^{2} \\ & x_{3} & ⟼ & x_{3} + x_{1}x_{2} \end{aligned}  and  \begin{aligned}ψ_{2} : & P & ⟶ & P \\ & x_{1} & ⟼ & x_{1} + x_{2}x_{3} \\ & x_{2} & ⟼ & x_{2} − x_{3} + x_{3}^{2} \\ & x_{3} & ⟼ & x_{3} \end{aligned}

It is easy to apply the preceding proposition in order to see that those two maps are ℚ-algebra automorphisms of P. Thus also φ = ψ_{2} ∘ ψ_{1} is a ℚ-algebra automorphism of P. Let f_{i} = φ(x_{i}) for i = 1, 2, 3, i.e. let f_{1} = x_{1} + x_{2}x_{3} , let f_{2} = x_{2} − x_{3} + x_{1}^{2} + x_{3}^{2} + 2x_{1}x_{2}x_{3} + x_{2}^{2}x_{3}^{2} , and let f_{3} = x_{3} + x_{1}x_{2} − x_{1}x_{3} + x_{1}x_{3}^{2} + x_{2}^{2}x_{3} − x_{2}x_{3}^{2} + x_{2}x_{3}^{3} . It follows that x_{1} , x_{2} , and x_{3} can be expressed as polynomials in f_{1} , f_{2} , and f_{3} by the method explained at the end of the last proposition. In the case at hand, the results are the impressive expressions

x_{1} = f_{1}^{9} − 3f_{1}^{7}f_{2} + 3f_{1}^{5}f_{2}^{2} + 3f_{1}^{6}f_{3} − f_{1}^{6} − f_{1}^{3}f_{2}^{3} − 6f_{1}^{4}f_{2}f_{3} + f_{1}^{5} + 2f_{1}^{4}f_{2}
+3f_{1}^{2}f_{2}^{2}f_{3} + 3f_{1}^{3}f_{3}^{2} − 2f_{1}^{3}f_{2} − f_{1}^{2}f_{2}^{2} − 2f_{1}^{3}f_{3} − 3f_{1}f_{2}f_{3}^{2} + f_{1}f_{2}^{2}
+2f_{1}f_{2}f_{3} + f_{3}^{3} − f_{2}f_{3} − f_{2}^{2} + f_{1}
x_{2} = −f_{1}^{6} + 2f_{1}^{4}f_{2} − f_{1}^{2}f_{2}^{2} − 2f_{1}^{3}f_{3} + f_{1}^{3} + 2f_{1}f_{2}f_{3} − f_{1}^{2} − f_{1}f_{2} − f_{3}^{2}
+f_{2} + f_{3}
x_{3} = f_{1}^{3} − f_{1}f_{2} + f_{3}

Exercise 1. Find a K -algebra homomorphism φ : P/I ⟶ P′/I′ such that P′/I′ is not a finitely generated P/I -module via φ.

Exercise 2. Solve the implicitization problems for the following tuples of polynomials.

a) (t^{3}, t^{4} − t, t^{5} + t − 1) ∈ ℚ[t]^{3}

b) (t^{31} + t^{6} + t, t^{8}, t^{10}) ∈ ℚ[t]^{3}

c) ( \frac{1}{2} t^{3}, t^{4} − \frac{1}{3} s, t^{5} + t − s^{2}) ∈ ℚ[s, t]^{3}

d) (s + t, s(s + 2t), s^{2}(s + 3t)) ∈ ℚ[s, t]^{3} (The set of zeros of the solution is called the tangent surface to the twisted cubic.)

e) (s^{3} − 3st^{2} − 3s, t^{3} − 3s^{2}t − 3t, 3s^{2} − 3t^{2}) ∈ ℚ[s, t]^{3} (The set of zeros of the solution is called the Enneper surface.)

Exercise 3. Let P/I be an affine K -algebra such that dim_{K}(P/I) is finite. Prove that every element in P/I is algebraic over K.

Exercise 4. Given polynomials f_{1}, …, f_{s} ∈ P = K[x_{1}, …, x_{n}] and an ideal I ⊆ P , how can one decide effectively whether the residue classes f_{1} + I, …, f_{s} + I of f_{1}, …, f_{s} in the affine K -algebra R = P/I are algebraically independent over K?

Exercise 5. Let P = K[x, y] be a polynomial ring over a field K, and let I be a non-zero principal ideal in P . Prove that at least one element of the set {x + I, y + I} ⊆ P/I is transcendental over K.

Exercise 6. Implement the method of Example 3.6.8 to compute the representation of a symmetric polynomial in terms of the elementary symmetric polynomials by writing a CoCoA function ReprSym2(…). Hint: Use the Gröbner basis of J = (x_{1} − s_{1}, …, x_{n} − s_{n}) provided by Tutorial 23.d.

Exercise 7. Let φ : K[x] → K[y] be a K -algebra homomorphism, and let f = φ(x).

a) Prove that φ is injective if and only if f ∉ K.

b) Prove that φ is surjective if and only if deg(f) = 1.

Exercise 8. Let φ : R → S be a ring homomorphism.

a) Prove that φ is a ring isomorphism (i.e. that there exists a ring homomorphism ψ : S ⟶ R such that ψ ∘ φ = id_{R} and φ ∘ ψ = id_{S}) if and only if φ is bijective.

b) Give an example of an injective ring homomorphism φ : R ⟶ S such that there is no ring homomorphism ψ : S ⟶ R which satisfies ψ ∘ φ = id_{R}.

c) Give an example of a surjective ring homomorphism φ : R ⟶ S such that there exists no ring homomorphism ψ : S ⟶ R satisfying φ ∘ ψ = id_{S}.

Exercise 9. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, and let φ : P ⟶ P be a K -algebra homomorphism. Prove that if φ is a K -algebra automorphism of P and φ(x_{i}) = f_{i} for i = 1, …, n, then the Jacobian determinant det( \frac{∂f_{i}}{∂x_{j}}) is an element of K \ \{0\}. The question whether over fields K of characteristic zero the converse of this statement holds is the famous (and as yet unsolved) Jacobian Conjecture.

Exercise 10. Let P = K[x_{1}, …, x_{n}] be a polynomial ring over a field K, let R = K[f_{1}, …, f_{m}] ⊆ P be a finitely generated subalgebra with f_{1}, …, f_{m} ∈ P , and let I ⊆ P be an ideal.

a) Show that we can get a presentation of the affine K -algebra R/(I ∩R) as follows. Let Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{m}], and let J be the ideal J = IQ + (y_{1} − f_{1}, …, y_{m} − f_{m}) in Q. Then there is an isomorphism of K -algebras

R/(I ∩ R) ≅ K[y_{1}, …, y_{m}]/(J ∩ K[y_{1}, …, y_{m}])

b) How can one compute a system of generators of the ideal I ∩ R in R? Write a CoCoA function which computes this system of generators.

c) Generalize parts a) and b) to P -submodules of P^{r} for some r ≥ 1 and their intersection with R^{r}.

Tutorial 39: Projections

In Section 3.4, we promised to provide you with a geometric interpretation of elimination. This interpretation is based on projections. It is the topic of the present tutorial. Since we shall need to use the language of algebraic geometry, we assume that you have read Section 2.6 and Tutorial 27.

Let K be a field. The affine space 𝔸_{K}^{n} was defined as the set K^{n} together with the Zariski topology. As usual in mathematics, we do not only consider objects, but we also introduce the appropriate kind of maps between them. A polynomial map (or a morphism of affine spaces) is defined as a map ψ : 𝔸_{K}^{m} → 𝔸_{K}^{n} for which there exist polynomials f_{1}, …, f_{n} ∈ K[y_{1}, …, y_{m}] such that ψ(a_{1}, …, a_{m}) = (f_{1}(a_{1}, …, a_{m}), …, f_{n}(a_{1}, …, a_{m})) for all points (a_{1}, …, a_{m}) ∈ 𝔸_{K}^{m}.

In the first part of this tutorial, we examine some general properties of polynomial maps. In particular, we want to study their fibers and images. Let P = K[x_{1}, …, x_{n}] and P′ = K[y_{1}, …, y_{m}] be two polynomial rings over K, let f_{1}, …, f_{n} ∈ P′, let φ : P ⟶ P′ be the K -algebra homomorphism defined by φ(x_{i}) = f_{i} for i = 1, …, n, and let ψ : 𝔸_{K}^{m} ⟶ 𝔸_{K}^{n} be the polynomial map satisfying ψ(a_{1}, …, a_{m}) = (f_{1}(a_{1}, …, a_{m}), …, f_{n}(a_{1}, …, a_{m})) for all (a_{1}, …, a_{m}) ∈ 𝔸_{K}^{m}.

a) Let I be an ideal in P, and let V = Z(I) be the zero-set in 𝔸_{K}^{n} defined by I. Show that ψ^{−1}(V) is the zero-set in 𝔸_{K}^{m} defined by the ideal J = (φ(f) | f ∈ I) ⊆ P′.

b) Let P = (a_{1}, …, a_{n}) ∈ 𝔸_{K}^{n}. Use a) to describe the fiber ψ^{−1}(P) of the polynomial map ψ over the point P. Write a CoCoA program Fiber(…) which computes the ideal defining this fiber.

c) Let g ∈ P be an element of the vanishing ideal of Im(ψ). Show that the polynomial g(f_{1}, …, f_{n}) ∈ P′ vanishes on all points of 𝔸_{K}^{m}. Recall that we proved in Tutorial 16.c that this implies g(f_{1}, …, f_{n}) = 0 if K is infinite. d) Let p be a prime number, let q = p^{e} for some e > 0, and let K be

the finite field K = 𝔽_{q} (see Tutorial 3). Prove that the ideal of all polynomials h ∈ P′ with the property that h(a_{1}, …, a_{m}) = 0 for all (a_{1}, …, a_{m}) ∈ 𝔸_{K}^{m} is generated by {y_{1}^{q} − y_{1}, …, y_{m}^{q} − y_{m}}. Hint: It suffices to show that h = 0 if deg_{y_{i}}(h) < q for i = 1, …, m. Consider h(a_{1}, …, a_{m−1}, y_{m}) and argue by induction on m. To avoid the problems encountered in d), we assume from now on that K

is an infinite field. Then we know that g(f_{1}, …, f_{n}) = 0 for all g ∈ I(Im(ψ)). We introduce the same notation as in the section and let Q be the polynomial ring Q = K[x_{1}, …, x_{n}, y_{1}, …, y_{m}], and J the ideal J = (x_{1}−f_{1}, …, x_{n}−f_{n}) in Q.

e) Prove that J is a prime ideal in Q, and conclude that I = J ∩ P is a prime ideal in P.

f) Show that the elimination ideal I = J ∩ P agrees with the vanishing ideal of Im(ψ). Hint: Apply Proposition 3.6.1.b.

g) Write a CoCoA function Image(…) which takes the tuple (f_{1}, …, f_{n}) and computes the vanishing ideal of the image of the associated polynomial map ψ. Apply your function Image(…) and calculate the vanishing ideals of the images of the following maps.

1) ψ : 𝔸_{ℚ}^{2} ⟶ 𝔸_{ℚ}^{3} defined by (a_{1}, a_{2}) ↦ (a_{1}a_{2}, a_{1}a_{2}^{2}, a_{2}^{3})

2) ψ : 𝔸_{ℚ}^{2} ⟶ 𝔸_{ℚ}^{3} defined by (a_{1}, a_{2}) ↦ (a_{1}, a_{1}a_{2}, a_{2}^{2}) (The image of this map is called Whitney’s umbrella.)

3) ψ : 𝔸_{ℚ}^{2} ⟶ 𝔸_{ℚ}^{5} defined by (a_{1}, a_{2}) ↦ (a_{1}, a_{2}, a_{1}^{2}, a_{1}a_{2}, a_{2}^{2})

(The image of this map is called the Veronese surface in 𝔸_{ℚ}^{5} .)

h) Let I = J ∩ P. Prove that Z(I) is the Zariski closure of Im(ψ). Hint: Tutorial 27.h implies this claim if K is algebraically closed. In the general case, embed K in its algebraic closure and argue that any zero-set in 𝔸_{K}^{n} containing Im(ψ) has to contain Z(I).

i) Show that Im(ψ) ⊂ Z(I) in the first example of part g) above. Moreover, prove that the same thing happens even if replace the field ℚ by ℂ. Hint: Consider the line Z(x_{2}, x_{3}). The last part of this tutorial is devoted to explaining its title. Given

positive integers m ≥ n and n distinct numbers i_{1}, …, i_{n} ∈ {1, …, m}, the map π_{i_{1},...,i_{n}} : 𝔸_{K}^{m} ⟶ 𝔸_{K}^{n} defined by (a_{1}, …, a_{m}) ↦ (a_{i_{1}}, …, a_{i_{n}}) is called the projection of 𝔸_{K}^{m} onto its components (i_{1}, …, i_{n}). It is clearly a polynomial map. Using projections, we can give the following geometric interpretation of the ideal J and its elimination ideal I = J ∩ P.

j) The set of all points (a_{1}, …, a_{m}, b_{1}, …, b_{n}) ∈ 𝔸_{K}^{m+n} such that we have b_{i} = f_{i}(a_{1}, …, a_{m}) for i = 1, …, n is called the graph of the map ψ. Let us denote it by G. Prove that G = Z(J) and J = I(G). k) Prove that the two projections π^{(1)} = π_{1,...,m} : 𝔸_{K}^{m+n} ⟶ 𝔸_{K}^{m} and

π^{(2)} = π_{m+1,...,m+n} : 𝔸_{K}^{m+n} ⟶ 𝔸_{K}^{n} induce surjections π_{G}^{(1)} : G ⟶ 𝔸_{K}^{m} and π_{G}^{(2)} : G ⟶ Z(I), and that we have a commutative diagram

[figure: 𝔸_{K}^{m}; Z(I) ⊆ 𝔸_{K}^{n}; G; ψ; π_{G}^{(2)}; π_{G}^{(1)}]

Thus the formation of the elimination ideal I = J ∩ P is the exact algebraic analogue of the formation of the projection π_{G}^{(2)} : G ⟶ Z(I).

Tutorial 40: Gröbner Bases and Invariant Theory

In Tutorial 12 and Example 3.6.8 we saw that the K -subalgebra of all symmetric polynomials in the polynomial ring P = K[x_{1}, …, x_{n}] over a field K is generated by the elementary symmetric polynomials, and we saw how one can represent an arbitrary symmetric polynomial as a polynomial expression in those elementary symmetric polynomials. In this tutorial we want to generalize these results to K -subalgebras of P consisting of polynomials which are invariant under the action of a finite matrix group.

Let GL_{n}(K) ⊆ Mat_{n}(K) be the group of all invertible n × n-matrices over K. It is called the general linear group over K and operates on the polynomial ring P by

\begin{matrix}GL_{n}(K) × P & ⟶ & P \\ (A , f) & ⟼ & f(A · x) \end{matrix}

where we use x to denote the column vector x = (x_{1}, …, x_{n})^{tr} , and where we let A · x = (a_{11}x_{1} + ⋯ + a_{1n}x_{n}, …, a_{n1}x_{1} + ⋯ + a_{nn}x_{n}) for A = (a_{ij}). In the sequel, we let G ⊆ GL_{n}(K) be a finite subgroup. We shall say that G is a finite matrix group.

a) Write a CoCoA function IsGroup(…) which takes a list of matrices in Mat_{n}(K) and checks whether they form a finite matrix group. Apply your function to verify that the following sets of matrices do indeed form finite matrix groups.

1) C_{2} = \{({1 \atop 0} {0 \atop 1}) , ({−1 \atop 0} {0 \atop −1})\} (cyclic group of order 2)

2) C_{3} = \{({1 \atop 0} {0 \atop 1}) , ({0 \atop 1} {−1 \atop −1}) , ({−1 \atop −1} {1 \atop 0})\} (cyclic group of order 3)

3) C_{4} = \{({1 \atop 0} {0 \atop 1}) , ({0 \atop 1} {−1 \atop 0}) , ({−1 \atop 0} {0 \atop −1}) , ({0 \atop −1} {1 \atop 0})\} (cyclic group of order 4)

4) V_{4} = \{({1 \atop 0} {0 \atop 1}) , ({−1 \atop 0} {0 \atop −1}) , ({0 \atop 1} {1 \atop 0}) , ({0 \atop −1} {−1 \atop 0})\} (Klein four group)

5) C_{6} = \{({1 \atop 0} {0 \atop 1}), ({0 \atop −1} {1 \atop 1}), ({−1 \atop −1} {1 \atop 0}), ({−1 \atop 0} {0 \atop −1}), ({0 \atop 1} {−1 \atop −1}), ({1 \atop 1} {−1 \atop 0})\} (cyclic group of order 6)

6) S_{3} = {( 1 0 0 0 1 0 0 0 1 ) , ( 0 1 0 1 0 0 0 0 1 ) , ( 0 0 1 0 1 0 1 0 0 ) , ( 1 0 0 0 0 1 0 1 0 ) , ( 0 0 1 1 0 0 0 1 0 ),

( 0 1 0 0 0 1 1 0 0 )} (permutation group on three elements)

7) D_{4} = \{({1 \atop 0} {0 \atop 1}) , ({−1 \atop 0} {0 \atop 1}), ({0 \atop 1} {−1 \atop 0}), ({−1 \atop 0} {0 \atop −1}), ({0 \atop 1} {1 \atop 0}), ({0 \atop −1} {−1 \atop 0}), ({1 \atop 0} {0 \atop −1}),

({0 \atop −1} {1 \atop 0})\} (dihedral group of order 8)

8) R_{8} = \{( 1 0 0 0 1 0 0 0 1 ),( {−1 \atop 0} ; 0 0 1 0 0 0 1 ),( 1 0 0 {0 \atop −1} ; 0 0 0 1 ),( 1 0 0 0 1 0 0 0 ; −1),( {−1 \atop 0} ; 0 {0 \atop −1} ; 0 0 0 1 ),

( {−1 \atop 0} ; 0 0 1 0 0 0 ; −1),( 1 0 0 {0 \atop −1} ; 0 0 0 ; −1),( {−1 \atop 0} ; 0 {0 \atop −1} ; 0 0 0 ; −1)\} (reflection group of the

coordinate planes)

9) A_{4} = \{( {1 \atop 0} {0 \atop 0} {0 \atop 1} {0 \atop 0} {0 \atop 0} {1 \atop 0} {0 \atop 0} {0 \atop 1} ),( {0 \atop 1} {0 \atop 0} {1 \atop 0} {0 \atop 0} {0 \atop 0} {0 \atop 1} {0 \atop 0} {1 \atop 0} ),( {0 \atop 0} {1 \atop 0} {0 \atop 0} {0 \atop 1} {1 \atop 0} {0 \atop 0} {0 \atop 1} {0 \atop 0} ),( {0 \atop 0} {0 \atop 1} {0 \atop 0} {1 \atop 0} {0 \atop 1} {0 \atop 0} {1 \atop 0} {0 \atop 0} ),( {0 \atop 1} {0 \atop 0} {0 \atop 0} {1 \atop 0} {1 \atop 0} {0 \atop 0} {0 \atop 0} {0 \atop 1} ),

( {0 \atop 0} {1 \atop 0} {1 \atop 0} {0 \atop 0} {0 \atop 1} {0 \atop 0} {0 \atop 0} {0 \atop 1} ) , ( {0 \atop 1} {0 \atop 0} {0 \atop 0} {0 \atop 1} {0 \atop 0} {1 \atop 0} {1 \atop 0} {0 \atop 0} ) , ( {0 \atop 0} {0 \atop 1} {1 \atop 0} {0 \atop 0} {0 \atop 0} {1 \atop 0} {0 \atop 1} {0 \atop 0} ) , ( {0 \atop 0} {1 \atop 0} {0 \atop 1} {0 \atop 0} {0 \atop 0} {0 \atop 1} {1 \atop 0} {0 \atop 0} ) , ( {0 \atop 0} {0 \atop 1} {0 \atop 1} {0 \atop 0} {1 \atop 0} {0 \atop 0} {0 \atop 0} {1 \atop 0} ) ,

( {1 \atop 0} {0 \atop 0} {0 \atop 0} {1 \atop 0} {0 \atop 0} {0 \atop 1} {0 \atop 1} {0 \atop 0} ) , ( {1 \atop 0} {0 \atop 0} {0 \atop 0} {0 \atop 1} {0 \atop 1} {0 \atop 0} {0 \atop 0} {1 \atop 0} )\} (alternating group on four elements)

10) W_{24} = \{( 1 0 0 0 1 0 0 0 1 ) , ( {−1 \atop 0} ; 0 {0 \atop −1} ; 0 0 0 1 ) , ( {−1 \atop 0} ; 0 0 1 0 0 0 ; −1) , ( 1 0 0 {0 \atop −1} ; 0 0 0 ; −1) ,

( 0 1 0 {−1 \atop 0} ; 0 0 0 1 ) , ( {0 \atop −1} ; 0 1 0 0 0 0 1 ) , ( 0 1 0 1 0 0 0 0 ; −1), ( {0 \atop −1} ; 0 {−1 \atop 0} ; 0 0 0 ; −1), ( 0 0 1 0 1 0 {−1 \atop 0} ; 0 ),

( 0 0 1 {0 \atop −1} ; 0 1 0 0 ) , ( 0 0 ; −1 0 1 0 1 0 0 ) , ( 0 0 ; −1 {0 \atop −1} ; 0 {−1 \atop 0} ; 0 ) , ( 1 0 0 0 0 ; −1 0 1 0 ) , ( 1 0 0 0 0 1 {0 \atop −1} ; 0 ) ,

( {−1 \atop 0} ; 0 0 0 1 0 1 0 ) , ( {−1 \atop 0} ; 0 0 0 ; −1 {0 \atop −1} ; 0 ) , ( 0 0 1 1 0 0 0 1 0 ) , ( 0 0 1 {−1 \atop 0} ; 0 {0 \atop −1} ; 0 ) , ( 0 0 ; −1 1 0 0 {0 \atop −1} ; 0 ) ,

( 0 0 ; −1 {−1 \atop 0} ; 0 0 1 0 ) , ( 0 1 0 0 0 1 1 0 0 ) , ( {0 \atop −1} ; 0 0 0 ; −1 1 0 0 ) , ( 0 1 0 0 0 ; −1 {−1 \atop 0} ; 0 ) , ( {0 \atop −1} ; 0 0 0 1 {−1 \atop 0} ; 0 )\}

(rotation group of the cube)

b) A polynomial f ∈ P is said to be invariant under G if it satisfies f(A · x) = f(x_{1}, …, x_{n}) for all matrices A ∈ G. Write a CoCoA function IsInvariant(…) which takes a list of matrices representing a finite matrix group and a polynomial f ∈ P, checks whether f is invariant under this group, and returns the corresponding Boolean value. Apply your function in the following cases.

1) G = C_{2} , f = x^{2} − xy + y^{2}

2) G = C_{4} , f = x^{3}y + 2x^{2}y^{2} − xy^{3}

3) G = W_{24} , f = (x^{2} − y^{2})(x^{2} − z^{2})(y^{2} − z^{2})

4) G = W_{24} , f = xyz(x^{2} − y^{2})(x^{2} − z^{2})(y^{2} − z^{2})

c) Show that the set of all polynomials in P which are invariant under G is a graded K -subalgebra of P. We denote this subalgebra by P^{G} and call it the ring of invariants of G. (Here we equip P with the standard grading.) Recall that not every K -subalgebra of P is finitely generated (see Exam-

ple 2.6.4). Our next goal is to show that P^{G} is a finitely generated subalgebra if char(K) = 0. Thus we assume from here on that K is a field of characteristic zero. The map ϱ_{G} : P ⟶ P defined by ϱ_{G}(f) = \frac{1}{#G} ∑_{A∈G} f(A · x) is called the Reynolds operator of G.

d) Show that ϱ_{G} : P ⟶ P is a homogeneous K -linear map which has the following properties.

1) For all f ∈ P^{G} and g ∈ P, we have ϱ_{G}(fg) = f ϱ_{G}(g).

2) We have Im(ϱ_{G}) = P^{G} and ϱ_{G} ∘ ϱ_{G} = ϱ_{G}.

e) Write a CoCoA function Reynolds(…) which takes a list of matrices representing the elements of G and a polynomial f and computes ϱ_{G}(f). Apply this function in the following cases.

1) G = V_{4} , f = x + y

2) G = D_{4} , f = x^{3} − xy + y^{3}

3) G = A_{4} , f = x_{1} − x_{2} + x_{3} − x_{4}

f) Prove that there are finitely many homogeneous polynomials f_{1}, …, f_{s} in P such that P^{G} = K[f_{1}, …, f_{s}]. Hint: Let I be the ideal in P which is generated by all homogeneous polynomials f ∈ P^{G} such that deg(f) > 0, and let {f_{1}, …, f_{s}} be a homogeneous system of generators of I. Assume that P^{G} ⊂ I and choose a homogeneous polynomial g ∈ I\P^{G} of minimal degree. Then use Corollary 1.7.11 to write g = ∑_{i=1}^{s} h_{i}f_{i} with homogeneous polynomials h_{1}, …, h_{s} ∈ P of positive degree. Now apply ϱ_{G} and use d). Unfortunately, the proof of f) does not tell us how we can find finitely

many homogeneous polynomials f_{1}, …, f_{s} ∈ P such that P^{G} = K[f_{1}, …, f_{s}]. Below we formulate an algorithm which does this job, although it is rather inefficient. If you are adventurous, you can try to reconstruct Emmy Noether’s proof for the correctness of this algorithm later in part j). A more powerful computational approach to the problem of finding the ring of invariants is based on Molien’s Theorem and will be discussed in Volume 2.

g) Consider the following sequence of instructions.

1) Let L = ∅. Choose a degree-compatible term ordering σ on 𝕋^{n} and compute the tuple (t_{1}, …, t_{N}) of all terms of degree ≤ #G in P, ordered increasingly with respect to σ. (Here N is the number of such terms.)

2) For i = 1, …, N, compute ϱ_{G}(t_{i}). Use the Subalgebra Membership Test 3.6.7 to check whether ϱ_{G}(t_{i}) ∈ K[f | f ∈ L]. If this is not the case, append ϱ_{G}(t_{i}) to the set L.

3) Return L.

Later we shall prove that this is an algorithm which returns a set L of homogeneous polynomials such that P^{G} = K[f | f ∈ L]. Implement this algorithm in a CoCoA function Invariants(…) whose input is a list of matrices representing the elements of G.

h) Apply your function Invariants(…) to compute the ring of invariants for as many of the groups listed in part a) as possible. How far can you get? Can you think of possible optimizations of your function?

i) After you have found a system of algebra generators for P^{G}, you can use Corollary 3.6.7 to represent any invariant polynomial as a polynomial expression in those algebra generators. Write a CoCoA function ReprInvariants(…) which performs this task and apply it in the following cases.

1) G = C_{2} , f = x^{10} + 2x^{9}y + 3x^{8}y^{2} + ⋯ + 11y^{10}

2) G = C_{4} , f = 3x^{6}y^{2} − 2x^{5}y^{3} + 6x^{4}y^{4} + 2x^{3}y^{5} + 3x^{2}y^{6}

3) G = C_{6} , f = x^{4}y^{2} − 2x^{3}y^{3} + x^{2}y^{4}

j) (This part is a more challenging project.) Prove the correctness of the algorithm in g) using the following steps.

1) For d ≥ 0, let p_{d} = x_{1}^{d} + ⋯ + x_{n}^{d}. Using induction on n, prove Newton’s identities

p_{d} − s_{1}p_{d−1} + ⋯ + (−1)^{d−1}s_{d−1}p_{1} + (−1)^{d}ds_{d} = 0

where s_{1}, …, s_{n} are the elementary symmetric polynomials, and where s_{i} = 0 for i > n (see Tutorial 12.c).

2) Using induction on d ≥ 0, prove that s_{d} is a polynomial in p_{1}, …, p_{n}. Conclude that every symmetric polynomial is a polynomial in p_{1}, …, p_{n}. (You need to use char(K) = 0 here.)

3) Show that it suffices to prove ϱ_{G}(x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}) ∈ K[f | f ∈ L] for all tuples (α_{1}, …, α_{n}) ∈ ℕ^{n} in order to show the correctness of the algorithm.

4) Let d ≥ 1 and γ = #G. Introduce new indeterminates y_{1}, …, y_{n}. For every matrix A ∈ G, we let a_{1}, …, a_{n} be the rows of A and q_{A} the polynomial q_{A} = (a_{1} · x) y_{1} + ⋯ + (a_{n} · x) y_{n} in K[x_{1}, …, x_{n}, y_{1}, …, y_{n}]. Prove the formula

∑_{A∈G}(q_{A})^{d} = γ · ∑_{α_{1}+···+α_{n}=d} \frac{d!}{α_{1}!···α_{n}!} ϱ_{G}(x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}) y_{1}^{α_{1}} ⋯ y_{n}^{α_{n}}

Hint: Substitute (a_{i} · x) y_{i} in the expansion of (x_{1} + ⋯ + x_{n})^{d} and sum over all A ∈ G.

5) Using step 2), write ∑_{A∈G}(q_{A})^{d} as a polynomial in the expressions

∑_{A∈G}(q_{A}), …, ∑_{A∈G}(q_{A})^{γ}.

6) Then substitute the formulas of step 4) in this polynomial and compare the coefficients of y_{1}^{α_{1}} ⋯ y_{n}^{α_{n}} for all (α_{1}, …, α_{n}) ∈ ℕ^{n}.

Tutorial 41: Subalgebras of Function Fields

The purpose of this tutorial is to study finitely generated subalgebras of algebraic function fields. More precisely, we let R be an integral domain and Q(R) its field of fractions.

a) Show that Q(R) is a finitely generated R-algebra if and only if it is generated by a single element.

b) Given a_{1}, …, a_{r}, b_{1}, …, b_{r} ∈ R and a polynomial f ∈ R[y_{1}, …, y_{r}], prove that there exist i_{1}, …, i_{r} > 0 such that

b_{1}^{i_{1}} ⋯ b_{r}^{i_{r}}f = g(a_{1}, …, a_{r}) + h

where g ∈ R[y_{1}, …, y_{r}] and h ∈ (b_{1}y_{1}−a_{1}, …, b_{r}y_{r}−a_{r}) ⊆ R[y_{1}, …, y_{r}].

c) Let a_{1}, …, a_{r} ∈ R and b_{1}, …, b_{r} ∈ R \ {0}. Show that the finitely generated R-subalgebra R[\frac{a_{1}}{b_{1}} , …, \frac{a_{r}}{b_{r}}] of Q(R) has a presentation

R[\frac{a_{1}}{b_{1}} , …, \frac{a_{r}}{b_{r}}] ≅ R[y_{1}, …, y_{r}]/I ∩ R[y_{1}, …, y_{r}]

where y_{1}, …, y_{r}, z_{1}, …, z_{r} are independent indeterminates over R and where I is the ideal I = (b_{1}y_{1} −a_{1}, …, b_{r}y_{r} −a_{r}, b_{1}z_{1} −1, …, b_{r}z_{r} −1) in the ring R[y_{1}, …, y_{r}, z_{1}, …, z_{r}]. (Hint: Define an R-algebra homomorphism φ : R[y_{1}, …, y_{r}] ⟶ R[\frac{a_{1}}{b_{1}} , …, \frac{a_{r}}{b_{r}}] by y_{i} ⟼ \frac{a_{i}}{b_{i}} for i = 1, …, r and show that its kernel is I ∩ R[y_{1}, …, y_{r}].)

d) Now let K be a field and R = K[x_{1}, …, x_{n}]/𝔭 an affine K -algebra, where 𝔭 ⊆ K[x_{1}, …, x_{n}] is a prime ideal. Prove that for polynomials f_{1}, …, f_{r} ∈ K[x_{1}, …, x_{n}] and g_{1}, …, g_{r} ∈ K[x_{1}, …, x_{n}] \ {0} we have a presentation

R[\frac{f_{1}}{g_{1}} , …, \frac{f_{r}}{g_{r}}] ≅ K[x_{1}, …, x_{n}, y_{1}, …, y_{r}]/(I+\overline{𝔭})∩K[x_{1}, …, x_{n}, y_{1}, …, y_{r}]

where I is defined in an analogous way as above and \overline{𝔭} is the extension ideal of 𝔭 in K[x_{1}, …, x_{n}, y_{1}, …, y_{r}, z_{1}, …, z_{r}].

e) Write a CoCoA function FFSubAlg(…) which finds a presentation of R[\frac{f_{1}}{g_{1}} , …, \frac{f_{r}}{g_{r}}] for R = K[x_{1}, …, x_{n}]/J from the lists [f_{1}, …, f_{r}] and [g_{1}, …, g_{r}], and from a system of generators of J.

f) Apply the function FFSubAlg(…) to compute a presentation of R[\frac{x̄_{2}}{x̄_{1}} ] for R = ℚ[x_{1}, x_{2}, x_{3}, x_{4}]/(x_{1}x_{3} −x_{2}x_{4}). Show also that R[y_{1}]/(x_{1}y_{1} −x_{2}) is not an integral domain.

g) Prove R[\frac{a}{b}] ≅ R[y]/(by − a) if R is a factorial domain and a, b ∈ R \ \{0\} are coprime. Note that R[\frac{1}{b}] ≅ R[y]/(by − 1) is true without the assumption that R is a factorial domain (see Proposition 3.5.6).

3.7 Systems of Polynomial Equations

ella va amica da cima a valle

[from hilltop to valley lightly she drifts] (Lorenzo Robbiano, palindromic verse.

It is painted on a sundial in Castelletto d’Orba)

This is the last section, but in some sense it could also be considered as a chapter by itself, or perhaps as the starting point of Volume 2, or as a motivation for the subjects dealt with in this book. We are not trying to suggest a palindromic reading of the topics treated so far. Rather, we would like to convince you that the ideas developed here should not be considered as steps of a linear evolution with a clear direction.

Mathematics moves as other human activities do. Sometimes it seems to climb up a steep mountain, sometimes it slowly drifts down into fertile valleys. What is the ultimate goal? It could be the solution of a famous problem, the development of a new theory, a better understanding of an old theory, or the pursuit of concrete applications in the real world. Mathematicians go back and forth between those goals, following old paths or creating new ones.

During this perennial wandering, almost certainly they are going to encounter systems of polynomial equations. They appear in many mathematical models of physical systems, in the study of algebraic structures, and in the algebraic description of geometric objects. We should keep in mind that the main goal is to solve them. Thus they lie at the heart of Computational Commutative Algebra.

Our choice, to devote this final section to systems of polynomial equations, was made because we wanted to show how many of the computational skills acquired so far have to be used in order to get a better grip on the problem. No more wandering about. Digging the ground and finding the roots is the main task now. Let us have a closer look at the difficulties which lie ahead.

Given polynomials f_{1}, …, f_{s} in the polynomial ring P = K[x_{1}, …, x_{n}] over a field K, we can study the following system of polynomial equations:

{ f_{1}(x_{1}, …, x_{n}) = 0 ; ⋮ ; f_{s}(x_{1}, …, x_{n}) = 0

Three fundamental questions suggest themselves.

1. What does it mean to solve this system of equations?

If the polynomials f_{1}, …, f_{s} have degrees ≤ 1, the answer is a wellknown result in Linear Algebra: there are finitely many vectors in K^{n} such that their linear combinations are precisely the set of solutions of the system of equations. As soon as one of the polynomials f_{1}, …, f_{s} has degree ≥ 2, the situation becomes much more complicated.

It turns out that it is more promising to look for the set of solutions of the above system of equations in \overline{K}^{n}, where \overline{K} is the algebraic closure of K. Thus, to solve the above system of equations means to determine the set of zeros of the ideal I = (f_{1}, …, f_{s}) in the sense of Section 2.6.

2. How can we describe this set of solutions?

For a single solution (a_{1}, …, a_{n}) ∈ \overline{K}^{n}, we can try to determine the minimal polynomials of a_{1}, …, a_{n} over K. This specifies those algebraic numbers up to conjugates. And if K = ℚ, we could then use methods of numerical analysis to single out the precise solution from that set of conjugates by finding a sufficiently good approximation in ℚ[i]. Already if K is a finite field, those methods do not apply.

Thus, in most cases, we shall have to content ourselves with solving the system of equations in a symbolic way. This leaves us with the following problem. Suppose that a solution (a_{1}, …, a_{n}) ∈ \overline{K}^{n} is described by the minimal polynomials of a_{1}, …, a_{n} over K.

3. How many and which tuples of conjugates form the set of solutions?

Towards the end of this section we shall give what we view as a good answer to this question. We shall show how to compute a single polynomial in one indeterminate such that if you assign symbols to its roots, then you can write down the exact solutions of the system as polynomial expressions in those symbols.

To organize the material, we decided to split this section into three subsections. They deal with a bound for the number of solutions, radicals of zero-dimensional ideals, and with solving systems effectively. Let us look at their contents one-by-one.

First, it is important to be able to recognize which systems have only a finite number of solutions. This is achieved by the Finiteness Criterion 3.7.1. If the set of solutions is infinite, we cannot list them anyway, so let us assume it is finite. Then we shall provide estimates for the number of solutions. It turns out that dim_{K}(P/I) provides such a bound (see Proposition 3.7.5). However this bound is not sharp (see Example 3.7.6), because it is unable to distinguish between simple and multiple roots.

In the second subsection we turn our attention to radical ideals. Starting from this point we shall assume that either char(K) = 0 or K is a perfect field of characteristic char(K) = p > 0 which has effective p^{th} roots (see Definition 3.7.10). In order to find an algorithm which computes the radical of the given ideal I = (f_{1}, …, f_{s}), we first have to explain how one can compute the squarefree part of a polynomial in K[x] (see Proposition 3.7.12). Then we prove Seidenberg’s Lemma 3.7.15 which provides a criterion for a zero-dimensional ideal I to be radical and permits us to develop an algorithm which computes the radical of I (see Corollary 3.7.16). If the ideal is radical, we finally get the optimal bound for the number of solutions (see Theorem 3.7.19).

After all this preparatory work, we are ready to handle the problem of solving systems effectively in the third subsection. Given a zero-dimensional radical ideal, we show how to change coordinates in order to put the zeros in normal x_{n} -position (see Proposition 3.7.22), i.e. to transform the given system into a new one which is better suited for revealing its solutions. Then the Shape Lemma 3.7.25 says that, after we compute the reduced Lex-Gröbner basis of the resulting ideal, we can write down the solution set of the system in a very explicit way. The last step is made in Corollary 3.7.26 where we present an algorithm which combines all the pieces of information acquired before and computes the solutions in a suitable format.

A final remark is necessary here. We do not claim that the algorithms contained in this section are particularly efficient. They are mainly intended to show that an algorithmic solution of the problem is possible, and to indicate the twists and turns one encounters when the computation has to be carried out in a symbolic environment.

In the sequel, let K be a field, let P = K[x_{1}, …, x_{n}], let f_{1}, …, f_{s} ∈ P, and let I = (f_{1}, …, f_{s}). Moreover, let \overline{K} be the algebraic closure of K, and let \overline{P} = \overline{K}[x_{1}, …, x_{n}]. By S we shall denote the system of polynomial equations

{ f_{1}(x_{1}, …, x_{n}) = 0 ; ⋮ ; f_{s}(x_{1}, …, x_{n}) = 0

3.7.A A Bound for the Number of Solutions

Given a system of polynomial equations S as above, there can be finitely or infinitely many solutions (a_{1}, …, a_{n}) ∈ \overline{K}^{n}. Our first proposition provides an algorithmic criterion for finiteness, since Buchberger’s Algorithm allows us to check condition e) effectively.

Proposition 3.7.1. (Finiteness Criterion) Let σ be a term ordering on 𝕋^{n}. The following conditions are equivalent.

a) The system of equations S has only finitely many solutions.

b) The ideal I\overline{P} is contained in only finitely maximal ideals of \overline{P}.

c) For i = 1, …, n, we have I ∩ K[x_{i}] ≠ (0).

d) The K -vector space K[x_{1}, …, x_{n}]/I is finite-dimensional.

e) The set 𝕋^{n} \ LT_{σ}{I} is finite.

f) For every i ∈ {1, …, n}, there exists a number α_{i} ≥ 0 such that we have x_{i}^{α_{i}} ∈ LT_{σ}(I).

Proof. First we show a) ⇒ b). By Corollary 2.6.9, every maximal ideal 𝔪 of \overline{P} is of the form 𝔪 = (x_{1} − a_{1}, …, x_{n} − a_{n}) with a_{1}, …, a_{n} ∈ \overline{K}. If 𝔪 contains I\overline{P}, then the polynomials f_{1}, …, f_{s} lie in the kernel of the substitution homomorphism φ : \overline{P} ⟶ \overline{K} which is defined by x_{1} ↦ a_{i} for i = 1, …, n. Therefore (a_{1}, …, a_{n}) is a solution of S. Since there are only finitely many such solutions, there can be only finitely many maximal ideals 𝔪 containing I\overline{P}.

Now we prove b) ⇒ f). Let 𝔪_{1}, …, 𝔪_{t} be the maximal ideals of \overline{P} containing I\overline{P}. By Corollary 2.6.9, there are tuples (a_{i1}, …, a_{in}) such that 𝔪_{i} = (x_{1} − a_{i1}, …, x_{n} − a_{in}) for i = 1, …, t. For j = 1, …, n, we form the polynomials g_{j} = ∏_{i=1}^{t}(x_{j} − a_{ij}) ∈ \overline{K}[x_{j}]. From what we have shown in the proof of a) ⇒ b) it follows that g_{j} vanishes on every solution of S. Thus Hilbert’s Nullstellensatz 2.6.16 yields a number α_{j} ≥ 0 such that g_{j}^{α_{j}} ∈ I\overline{P}. Hence we have x_{j}^{tα_{j}} ∈ LT_{σ}(I\overline{P}). Now Lemma 2.4.16 shows x_{j}^{tα_{j}} ∈ LT_{σ}(I).

The implication f) ⇒ e) is clear, because every term of a sufficiently high degree is divisible by one of the terms x_{1}^{tα_{1}}, …, x_{n}^{tα_{n}}, and e) ⇒ d) is a consequence of Macaulay’s Basis Theorem 1.5.7. Thus we prove d) ⇒ c) next. Since P/I is a finite-dimensional K -vector space, the residue classes 1 + I, x_{i} + I, x_{i}^{2} + I, … are K -linearly dependent. Hence there are non-zero polynomials g_{i} ∈ I ∩ K[x_{i}] for every i ∈ {1, …, n}. Finally, given non-zero polynomials g_{i} ∈ I ∩ K[x_{i}] for i = 1, …, n, the i-th coordinate of any solution of S is a zero of g_{i}. Therefore there are at most deg(g_{1}) ⋯ deg(g_{n}) such solutions, proving c) ⇒ a). □

The proof of the preceding proposition yields an easy bound for the number of solutions of S if this number is finite. We saw that, for i = 1, …, n, the elimination ideal I ∩K[x_{i}] is non-zero, and therefore generated by a nonzero polynomial g_{i} ∈ K[x_{i}]. Then the number of solutions of S was shown to be at most deg(g_{1}) ⋯ deg(g_{n}). In fact, a much sharper bound is available. Before we proceed to derive it, let us introduce the following terminology.

Definition 3.7.2. An ideal I = (f_{1}, …, f_{s}) in P = K[x_{1}, …, x_{n}] is called zero-dimensional if it satisfies the equivalent conditions of the Finiteness Criterion 3.7.1.

Corollary 3.7.3. With the same assumptions and notation as in the Finiteness Criterion 3.7.1, let I and J be ideals in P.

a) If I is maximal, then I is zero-dimensional.

b) If I is zero-dimensional and I ⊆ J, then J is zero-dimensional.

c) If I is zero-dimensional, then I\overline{P} is also zero-dimensional and

dim_{K}(P/I) = dim\overline{K}(\overline{P} /I\overline{P})

Proof. First we observe that a) is a consequence of Theorem 2.6.6.b and the Finiteness Criterion 3.7.1.d. The proof of b) follows from the fact that dim_{K}(P/J) ≤ dim_{K}(P/I). Since K ⊆ \overline{K}, a combination of Lemma 2.4.16.a and Macaulay’s Basis Theorem 1.5.7 yields dim_{K}(P/I) = dim\overline{K}(\overline{P} /I\overline{P}). This proves both claims of c). □

Since we are interested in describing the solutions of the system of polynomial equations S explicitly, we shall assume from now on that there are only finitely many such solutions, i.e. that the ideal I = (f_{1}, …, f_{s}) is zerodimensional. To prove the desired bound for the number of solutions of S we need one more ingredient, namely a ring-theoretic version of the Chinese Remainder Theorem.

Lemma 3.7.4. (Chinese Remainder Theorem) Let R be a ring, and let I_{1}, …, I_{t} be ideals in R.

a) The canonical R-linear map φ : R/(I_{1} ∩ ⋯ ∩ I_{t}) ⟶ ∏_{i=1}^{t} R/I_{i} is injective.

b) If the ideals I_{1}, …, I_{t} are pairwise comaximal, i.e. if I_{i} + I_{j} = R for i ≠ j, then the map φ is an isomorphism of R-modules.

Proof. Since the map φ is clearly injective, it suffices to show claim b). Fix a number i ∈ {1, …, t}, and let J_{i} = ∩_{j≠i}I_{j}. Since I_{i} and I_{j} are comaximal for all j ≠ i, we find a_{j} ∈ I_{i} and b_{j} ∈ I_{j} such that a_{j} + b_{j} = 1. Then 1 = ∏_{j≠i}(a_{j} +b_{j}) ∈ I_{i} +∏_{j≠i} I_{j} ⊆ I_{i} +J_{i} shows that the ideals I_{i} and J_{i} are comaximal. Thus there are elements p_{i} ∈ I_{i} and q_{i} ∈ J_{i} such that p_{i}+q_{i} = 1. Now it is easy to check that an element (r_{1} + I_{1}, …, r_{t} + I_{t}) of ∏_{i=1}^{t} R/I_{i} is the image of the residue class of q_{1}r_{1} +⋯+q_{t}r_{t} = (1−p_{1})r_{1} +…+(1−p_{t})r_{t} under φ. □

Proposition 3.7.5. (Bound for the Number of Solutions) Let f_{1}, …, f_{s} ∈ P be polynomials which generate a zero-dimensional ideal I = (f_{1}, …, f_{s}). Then the system of equations

f_{1}(x_{1}, …, x_{n}) = ⋯ = f_{s}(x_{1}, …, x_{n}) = 0

has at most dim_{K}(P/I) solutions in \overline{K}^{n}.

Proof. Let \overline{P} = \overline{K}[x_{1}, …, x_{n}]. By Proposition 2.6.11, the solutions of S correspond one-to-one to the maximal ideals in \overline{P} containing I\overline{P}. Let 𝔪_{1}, …, 𝔪_{t} be those maximal ideals. From I\overline{P} ⊆ 𝔪_{1} ∩ ⋯ ∩ 𝔪_{t} we get dim\overline{K}(\overline{P} /I\overline{P}) ≥ dim\overline{K}(\overline{P} /(𝔪_{1} ∩ ⋯ ∩ 𝔪_{t})). Now the Chinese Remainder Theorem yields \overline{P} /(𝔪_{1} ∩ ⋯ ∩ 𝔪_{t}) ≅ ∏_{i=1}^{t} \overline{P} /𝔪_{i}, and Corollary 2.6.9 shows \overline{P} /𝔪_{i} ≅ \overline{K} for i = 1, …, t. Finally, using Corollary 3.7.3.c, we obtain dim\overline{K}(\overline{P} /I\overline{P}) = dim_{K}(P/I). Altogether, we get

t=dim\overline{K}( ∏_{i=1}^{t} \overline{P} /𝔪_{i}) = dim\overline{K}(\overline{P} /(𝔪_{1} ∩ ⋯ ∩ 𝔪_{t}))
≤dim\overline{K}(\overline{P} /I\overline{P}) = dim_{K}(P/I)

which is the desired inequality. □

Of course, knowing that there are only finitely many solutions and having a bound for their number is only a small step towards actually solving a system of polynomial equations. Let us try to study solutions (a_{1}, …, a_{n}) ∈ \overline{K}^{n} of S more closely. Starting from a zero-dimensional ideal I = (f_{1}, …, f_{s}) in P, we may compute a generator g_{i} ∈ K[x_{i}] of the elimination ideal I ∩ K[x_{i}] for every i ∈ {1, …, n}. Then every coordinate a_{i} of a solution (a_{1}, …, a_{n}) of S is a zero of g_{i}.

Suppose we are able to factor polynomials in K[x_{i}] effectively (see for instance Tutorial 6). The irreducible factors of g_{i} are precisely the minimal polynomials over K of the i^{th} coordinates of the solutions of S. In simple cases, this easy observation may suffice to solve the system of equations completely, as the following example shows.

Example 3.7.6. Let us consider the three polynomials f_{1} = x^{2} + y + z − 1, f_{2} = x + y^{2} + z − 1, and f_{3} = x + y + z^{2} − 1 in P = ℚ[x, y, z]. They define a system of polynomial equations f_{1} = f_{2} = f_{3} = 0 and generate an ideal I = (f_{1}, f_{2}, f_{3}) in P. We observe that {f_{1}, f_{2}, f_{3}} is a DegRevLex-Gröbner Basis of I and deduce that LT_{DegRevlex}(I) = (x^{2}, y^{2}, z^{2}), so that dim_{ℚ}(P/I) = 8. Therefore 8 is an upper bound for the number of solutions of S.

How sharp is this a bound? When we compute generators g_{i} of the elimination ideals I ∩ ℚ[x_{i}] for i = 1, 2, 3 and factor them, we get

\begin{aligned}g_{1} & = & x^{6} − 4x^{4} + 4x^{3} − x^{2} & = & x^{2}(x − 1)^{2}(x + 1 + \sqrt{2})(x + 1 − \sqrt{2}) \\ g_{2} & = & y^{6} − 4y^{4} + 4y^{3} − y^{2} & = & y^{2}(y − 1)^{2}(y + 1 + \sqrt{2})(y + 1 − \sqrt{2}) \\ g_{3} & = & z^{6} − 4z^{4} + 4z^{3} − z^{2} & = & z^{2}(z − 1)^{2}(z + 1 + \sqrt{2})(z + 1 − \sqrt{2}) \end{aligned}

Each of those polynomials has four different zeros. By substituting them into the original system of equations, we see that of the 64 possible combinations only the five tuples \{(1, 0, 0), (0, 1, 0), (0, 0, 1), (−1 + \sqrt{2}, −1 + \sqrt{2}, −1 + \sqrt{2}), (−1 − \sqrt{2}, −1 − \sqrt{2}, −1 − \sqrt{2})\} are actual solutions.

In this example, we see other phenomena emerging. For instance, it is clear that the last step of the procedure applied in this example breaks down if the zeros of the polynomials g_{1}, …, g_{n} cannot be represented by radicals. Another important fact is that, while the bound given by Proposition 3.7.5 is 8, the actual number of solutions is 5.

Let us try to explain this phenomenon. If a polynomial f vanishes at the set of solutions of S, then also sqfree(f) vanishes at that set. Consequently, the system S has the same set of solutions as the system S′, where S′ is obtained from S by adding the squarefree parts of some polynomials in S. Looking at the example above, we can now understand why the upper bound given by Proposition 3.7.5 is not sharp. In the next subsection, we investigate this aspect of the theory more closely.

3.7.B Radicals of Zero-Dimensional Ideals

In the last example we encountered a case in which the system S had multiple solutions. What does this mean exactly? Arguing as above, we note that the system of equations defined by I = (f_{1}, …, f_{s}) has the same solutions as the system of equations defined by a set of generators of its radical

\sqrt{I} = \{f ∈ P | f^{i} ∈ I for some i ≥ 0\}

So, the next goal is to reduce the solution of systems of polynomial equations to the case where the polynomials generate a radical ideal. To this end, we need to introduce the notion of a perfect field.

Definition 3.7.7. A field K is called a perfect field if either its characteristic is 0 or its characteristic is p > 0 and we have K = K^{p}, i.e. every element in K has a p^{th} -root in K.

Let us immediately point out that, for a perfect field K of characteristic p > 0, the p^{th} root of an element a ∈ K is uniquely determined, because if b, c ∈ K satisfy b^{p} = c^{p} = a, then b^{p} − c^{p} = (b − c)^{p} = 0 implies b = c.

For instance, given a prime number p ∈ ℕ, the field K = 𝔽_{p} is perfect, since every element is its own p^{th} root. More generally, if K = 𝔽_{q} is any finite field, where q = p^{e} and e > 0, then the map x ↦ x^{p^{e−1}} provides p^{th} roots, because we have (x^{p^{e−1}})^{p} = x^{q} = x for all x ∈ K. At this point we know that fields of characteristic 0 and finite fields are perfect. Are there non-perfect fields? The answer is yes, as the following example shows.

Example 3.7.8. Let p ∈ ℕ be a prime number, let K = 𝔽_{p}, let x be an indeterminate, and let L = K(x) be the field of fractions of K[x]. Then, using the factoriality of K[x], we can easily see that x has no p^{th} root in L. Therefore the field L is not perfect.

Is there an effective method for computing the radical of a zero-dimensional ideal? The radical of a zero-dimensional ideal I = (f) in K[x] is easy to describe. It is the principal ideal generated by sqfree(f). Thus we shall first show how one can compute the squarefree part of a univariate polynomial. The algorithm is based on the following collection of useful facts about sqfree(f).

Proposition 3.7.9. Let K be a field and f ∈ K[x] a non-constant polynomial.

a) If gcd(f, f′) = 1, then f is squarefree.

b) Assume that one of the following conditions holds. 1) We have char(K) = 0.

2) We have char(K) = p > 0 and f = cf_{1}^{α_{1}} ⋯ f_{t}^{α_{t}}, where c ∈ K \ {0}, where α_{1}, …, α_{t} > 0 satisfy p ∤ α_{i} for i = 1, …, t, and where f_{1}, …, f_{t} are pairwise distinct irreducible monic polynomials.

Then the squarefree part of f is given by sqfree(f) = f/ gcd(f, f′).

c) Let K be a perfect field of characteristic p > 0. Then we have f′ = 0 if and only if f is of the form f = g^{p} for some polynomial g ∈ K[x].

d) Let K be a perfect field. Then the converse of a) holds, i.e. if f is squarefree, then we have gcd(f, f′) = 1.

Proof. First we prove a). Suppose that f is not squarefree. Then we can write f in the form f = f_{1}^{2}f_{2} with polynomials f_{1}, f_{2} ∈ K[x] such that f_{1} is not constant. We compute the derivative of f and get f′ = 2f_{1}f′_{1}f_{2} + f_{1}^{2}f′_{2} . Thus we have f_{1} | gcd(f, f′), a contradiction.

In order to see that claim b) holds, we write down a factorization f = cf_{1}^{α_{1}} ⋯ f_{t}^{α_{t}} as in 2). Then we note that gcd(f, f′) = f_{1}^{α_{1}−1} ⋯ f_{t}^{α_{t}−1} in both cases. Thus we get f/ gcd(f, f′) = cf_{1} ⋯ f_{t} = sqfree(f).

To prove c), we observe that if f = g^{p}, then f′ = pg′g^{p−1} = 0. Conversely, suppose that f′ = 0. We write f = ∑_{i≥0} a_{i}x^{i} with a_{i} ∈ K, and we see that f′ = ∑_{i≥1} ia_{i}x^{i−1} = 0 implies a_{i} = 0 for all i ≥ 0 such that p ∤ i. Hence the polynomial f is of the form f = ∑_{i≥0} a_{pi}x^{pi}. Since the field K is perfect, there exist elements b_{i} ∈ K such that a_{pi} = b_{i}^{p} for all i ≥ 0. Altogether, we find f = ∑_{i≥0}(b_{i}x^{i})^{p} = g^{p} for g = ∑_{i≥0} b_{i}x^{i}.

Finally we prove d). We decompose f into irreducible factors f = f_{1} ⋯ f_{t} and note that f′ = ∑_{i=1}^{t} f_{1} ⋯ f_{i−1}f′_{i}f_{i+1} ⋯ f_{t}. Now we claim that every irreducible polynomial f_{i} ∈ K[x] satisfies f′_{i} ≠ 0. If char(K) = 0, this is clear, and if char(K) = p > 0, it follows from c). Thus we get gcd(f_{i}, f′_{i}) = 1. This implies gcd(f_{i}, f′) = gcd(f_{i}, f′_{i}) = 1, and therefore gcd(f, f′) = 1. □

For the promised algorithm, we need one further ingredient. When we work over a perfect base field K of characteristic p > 0, Definition 3.7.7 requires that every element in K has a p^{th} root. But of course we need to be able to compute that root. This observation motivates the following definition.

Definition 3.7.10. Let K be a perfect field of characteristic p > 0. We shall say that K has effective p^{th} roots if there exists an algorithm which computes the p^{th} root of any element of K.

For instance, finite fields are perfect fields with effective p^{th} roots. Over perfect fields having effective p^{th} roots, we can extract the p^{th} root of univariate polynomials with vanishing derivative as follows.

Remark 3.7.11. Let K be a perfect field of characteristic char(K) = p > 0 which has effective p^{th} roots. Suppose that f ∈ K[x] is a non-constant polynomial such that f′ = 0. Then we can effectively compute the unique polynomial g ∈ K[x] such that f = g^{p}. Namely, we saw in the proof of Proposition 3.7.9.c that f is of the form f = ∑_{i≥0} a_{pi}x^{pi}. By assumption, for every i ≥ 0 such that a_{pi} ≠ 0, we can compute the element b_{i} ∈ K such that b_{i}^{p} = a_{pi}. Then g = ∑_{i≥0} b_{i}x^{i} is the desired polynomial.

Finally, all the tools we need to compute squarefree parts of univariate polynomials in characteristic p are in place. Ready, steady, go! (American English: Ready, set, go!)

Proposition 3.7.12. (Squarefree Parts in Characteristic p) Let K be a perfect field of characteristic p > 0 having effective p^{th} roots. Given a polynomial f ∈ K[x]\K, consider the following sequence of instructions.

1) Calculate s_{1} = gcd(f, f′). If s_{1} = 1, then return f.

2) Check whether we have s′_{1} = 0. In this case, s_{1} = g^{p} for some uniquely determined polynomial g ∈ K[x]. Calculate g, replace f by \frac{fg}{s_{1}} = \frac{f}{g^{p−1}} , and continue with step 1).

3) Compute s_{i+1} = gcd(s_{i}, s′_{i}) for i = 1, 2, … until s′_{i+1} = 0, i.e. until s_{i+1} is a p^{th} power s_{i+1} = g^{p} for some g ∈ K[x]. Then calculate g, replace f by \frac{fg}{s_{1}} , and continue with step 1).

This is an algorithm which computes the squarefree part sqfree(f) of f.

Proof. If gcd(f, f′) = 1, the algorithm stops in step 1) and returns the correct result by Proposition 3.7.9.a. If gcd(f, f′) ≠ 1, we write f = cf_{1}^{p}f_{2} with c ∈ K\{0} and monic polynomials f_{1}, f_{2} ∈ K[x] such that no p^{th} power of an irreducible polynomial divides f_{2} . Then we calculate f′ = cf_{1}^{p}f′_{2} and s_{1} = gcd(f, f′) = f_{1}^{p} gcd(f_{2}, f′_{2}). We let f_{3} = gcd(f_{2}, f′_{2}) and find s′_{1} = f_{1}^{p}f′_{3} .

If now s′_{1} = 0, the algorithm executes the second part of step 2). In this case, f′_{3} = 0 implies f_{3} = 1, because no p^{th} power of an irreducible polynomial divides f_{2} and f_{3} = gcd(f_{2}, f′_{2}) divides f_{2} . Hence it follows that s_{1} = f_{1}^{p}, and the polynomial g which is computed in step 2) equals f_{1} . Therefore we have \frac{f}{g^{p−1}} = f_{1}f_{2} . Since s_{1} = f_{1}^{p} ≠ 1, we have deg(f_{1}) > 0, and the algorithm is applied again to a polynomial of smaller degree.

If s′_{1} ≠ 0, we calculate s_{2} = gcd(s_{1}, s′_{1}) = f_{1}^{p} gcd(f_{3}, f′_{3}), and so on, until s′_{i+1} = 0 for some i ≥ 1. This case will eventually happen, since each iteration lowers the degree of the corresponding polynomial s_{i}. When s′_{i+1} = 0, we see as above that s_{i+1} = f_{1}^{p}. Thus the polynomial g calculated in step 3) equals f_{1} again, and the algorithm is applied to the polynomial \frac{ff_{1}}{s_{1}} = f_{1}f_{2}/ gcd(f_{2}, f′_{2}) which has clearly a smaller degree than f.

Finally, the correctness of the algorithm in the case s_{1} ≠ 1 follows from

sqfree(f) = sqfree(f_{1}^{p}f_{2}) = sqfree(f_{1} sqfree(f_{2}))
= sqfree(f_{1}f_{2}/ gcd(f_{2}, f′_{2})) = sqfree(ff_{1}/f_{1}^{p} gcd(f_{2}, f′_{2}))
= sqfree(ff_{1}/s_{1})

□

To improve our understanding of this algorithm, we shall now apply it in two non-trivial concrete cases.

Example 3.7.13. Let K = ℤ/(5), and let f = x^{31} −2x^{30} −x^{6} +2x^{5} ∈ K[x]. We apply the algorithm of Proposition 3.7.12 to compute the squarefree part of f.

1) Since f′ = x^{30} − x^{5} , we get s_{1} = gcd(f, f′) = x^{30} − x^{5} ≠ 1.

2) Since s′_{1} = 0, we see that s_{1} = g^{5} , where g = x^{6} − x. So we replace f by f = fg/s_{1} = x^{7} − 2x^{6} − x^{2} + 2x and start again.

1) Since f′ = 2x^{6} − 2x^{5} − 2x + 2, we get s_{1} = gcd(f, f′) = x^{5} − 1 ≠ 1.

2) Since s′_{1} = 0, we see that s_{1} = g^{5} , where g = x − 1. So we replace f by f = fg/s_{1} = x^{3} + 2x^{2} + 2x and start again.

1) Since f′ = −2x^{2} − x + 2, we get s_{1} = gcd(f, f′) = 1. At this point the algorithm stops and returns sqfree(f) = x^{3} + 2x^{2} + 2x. Using a factorization algorithm, we can check f = x^{31} −2x^{30} −x^{6} +2x^{5} =

x^{5}(x − 1)^{25}(x − 2) and sqfree(f) = x^{3} + 2x^{2} + 2x = x(x − 1)(x − 2).

Example 3.7.14. Let K = ℤ/(3) and f = x^{6} +x^{5} −x^{4} +x^{2} −x−1 ∈ K[x]. When we apply the algorithm of Proposition 3.7.12, we have to perform the following steps.

1) Since f′ = −x^{4} −x^{3} −x−1, we get s_{1} = gcd(f, f′) = x^{4} +x^{3} +x+1 ≠ 1.

2) We calculate s′_{1} = x^{3} + 1 ≠ 0.

3) We calculate s_{2} = gcd(s_{1}, s′_{1}) = x^{3} + 1. Since s′_{2} = 0, we find s_{2} = g^{3}, where g = x + 1. Thus we replace f by \frac{fg}{s_{1}} = x^{3} + x^{2} − x − 1.

1) Since f′ = −x − 1, we have s_{1} = gcd(f, f′) = x + 1 ≠ 1.

2) We calculate s′_{1} = 1 ≠ 0.

3) We calculate s_{2} = 1 and s′_{2} = 0. Hence s_{2} = g^{3}, where g = 1. We replace f by \frac{fg}{s_{1}} = x^{2} − 1.

1) Since f′ = −x, we get s_{1} = 1. At this point the algorithm stops and returns sqfree(f) = x^{2} − 1. Notice that in this case it is important that we divide fg by s_{1} in the

second execution of step 3), because \frac{fg}{s_{2}} = f.

Altogether, we may combine Proposition 3.7.9.b and Proposition 3.7.12 by saying that over fields of characteristic zero and over perfect fields of characteristic p > 0 having effective p^{th} roots, we can compute the squarefree part of a univariate polynomial effectively.

Our next proposition provides the key for reducing the computation of radicals of zero-dimensional ideals to the univariate case.

Proposition 3.7.15. (Seidenberg’s Lemma) Let K be a field, let P = K[x_{1}, …, x_{n}], and let I ⊆ P be a zero-dimensional ideal. Suppose that, for every i ∈ {1, …, n}, there exists a non-zero polynomial g_{i} ∈ I ∩ K[x_{i}] such that gcd(g_{i}, g′_{i}) = 1. Then I is a radical ideal.

Proof. By Proposition 3.7.9.a, the polynomials g_{1}, …, g_{n} are squarefree. We proceed by induction on n. For n = 1, the principal ideal I ⊆ K[x_{1}] contains a squarefree polynomial. Therefore it is generated by a squarefree polynomial, i.e. it is a radical ideal.

Now let n > 1. We write g_{1} = h_{1} ⋯ h_{t} with irreducible polynomials h_{1}, …, h_{t} ∈ K[x_{1}]. We claim that I = ∩_{i=1}^{t}(I + (h_{i})). For every polynomial f ∈ ∩_{i=1}^{t}(I + (h_{i})) there are r_{i} ∈ I and q_{i} ∈ P such that f = r_{i} + q_{i}h_{i} for i = 1, …, t. Obviously, we have f · ∏_{j≠i} h_{j} ∈ I for i = 1, …, t, and because of gcd(∏_{j≠1} h_{j}, …, ∏_{j≠t} h_{j}) = 1 we find ℓ_{1}, …, ℓ_{t} ∈ K[x_{1}] such that ℓ_{1} ∏_{j≠1} h_{j} + ⋯ + ℓ_{t} ∏_{j≠t} h_{j} = 1 (see Proposition 1.2.8.c). Altogether, f = ∑_{i=1}^{t} ℓ_{i}f ∏_{j≠i} h_{j} ∈ I proves the claim.

Because of this claim and the fact that a finite intersection of radical ideals is again radical, it suffices to show that I + (h_{i}) is radical for i = 1, …, t. So we may assume that g_{1} is irreducible. Hence the field L = K[x_{1}]/(g_{1}) is a finite K -vector space, and the canonical surjective homomorphism φ : K[x_{1}, …, x_{n}] ⟶ L[x_{2}, …, x_{n}] satisfies ker(φ) = (g_{1}) ⊆ I. The ideal J = φ(I) is again zero-dimensional, because L[x_{2}, …, x_{n}]/J ≅ P/I. For all i = 2, …, n, the polynomials φ(g_{i}) = g_{i} ∈ L[x_{2}, …, x_{n}] satisfy gcd(g_{i}, g′_{i}) = 1 again. Therefore J is a radical ideal by the inductive hypothesis, i.e. we have no non-zero nilpotents in L[x_{2}, …, x_{n}]/J. The above isomorphism shows that also P/I has no non-zero nilpotents, hence I is a radical ideal. □

As a consequence of Seidenberg’s Lemma, we can now prove the following straightforward algorithm for computing the radical of a zero-dimensional polynomial ideal.

Corollary 3.7.16. (Computation of Radicals of Zero-Dimensional Ideals) Let K be a field of characteristic zero or a perfect field of characteristic p > 0 having effective p^{th} roots. Then the following algorithm computes the radical of a zero-dimensional ideal I in K[x_{1}, …, x_{n}].

1) For i = 1, …, n compute a generator g_{i} ∈ K[x_{i}] of the elimination ideal I ∩ K[x_{i}].

2) Using Proposition 3.7.9.b or Proposition 3.7.12, compute sqfree(g_{1}), …, sqfree(g_{n}) and return the ideal I + (sqfree(g_{1}), …, sqfree(g_{n})).

Proof. By Proposition 3.7.1.c, the polynomials g_{1}, …, g_{n} are non-zero. Since the ideal J = I + (sqfree(g_{1}), …, sqfree(g_{n})) satisfies I ⊆ J ⊆ \sqrt{I}, we have \sqrt{I} = \sqrt{J}. For i = 1, …, n, let h_{i} = sqfree(g_{i}). By Proposition 3.7.9.d, the polynomials h_{i} satisfy gcd(h_{i}, h′_{i}) = 1. Thus Seidenberg’s Lemma yields the claim. □

Notice that the ideal J = I + (sqfree(g_{1}), …, sqfree(g_{n})) returned by this algorithm satisfies J ∩K[x_{i}] = (sqfree(g_{i})) for i = 1, …, n. Next, we want to see the above algorithm working in practice. It allows us to replace a system of polynomial equations by another one which has the same set of solutions, but corresponds to an ideal which is usually larger.

Example 3.7.17. Let us consider the following system S over the polynomial ring P = ℚ[x, y, z].

\{ \begin{matrix}y^{2} − \frac{2}{375}xz + \frac{22}{75}yz + \frac{29}{1500}z^{2} + \frac{2}{75}x − \frac{7}{15}y − \frac{7}{150}z = 0 \\ xy + \frac{31}{150}xz − \frac{1}{5}yz − \frac{1}{50}z^{2} − \frac{8}{15}x + y + \frac{1}{10}z = 0 \\ x^{2} − \frac{7}{15}xz + 4yz + \frac{2}{5}z^{2} + \frac{7}{3}x − 20y − 2z = 0 \\ z^{3} + \frac{6}{5}xz + 24yz − \frac{38}{5}z^{2} − 6x − 120y + 13z = 0 \\ yz^{2} − \frac{3}{25}xz − \frac{47}{5}yz + \frac{3}{50}z^{2} + \frac{3}{5}x + 22y − \frac{3}{10}z = 0 \\ xz^{2} − 7xz + 10x = 0 \end{matrix}

The associated ideal I ⊆ P, i.e. the ideal generated by the left-hand sides of the equations in S, satisfies dim_{ℚ}(P/I) = 7, as we can compute for instance using Buchberger’s Algorithm 2.5.5 and Macaulay’s Basis Theorem 2.4.11. The upper bound for the number of solutions of S given by Proposition 3.7.5 is therefore 7.

Now we compute the three generators g_{1} , g_{2} , and g_{3} of the elimination ideals I ∩ ℚ[x], I ∩ ℚ[y], and I ∩ ℚ[z]. We obtain g_{1} = x^{4} + 2x^{3} − 3x^{2} , g_{2} = y^{4} + \frac{4}{5}y^{3} + \frac{1}{20}y^{2} − \frac{1}{20}y, and g_{3} = z^{4} − 12z^{3} + 45z^{2} − 50z. Then we use Proposition 3.7.9.b to calculate sqfree(g_{1}) = x^{3} + 2x^{2} − 3x, sqfree(g_{2}) = y^{3} + \frac{3}{10}y^{2} − \frac{1}{10}y, and sqfree(g_{3}) = z^{3} − 7z^{2} + 10z.

By adding these three equations to the system, we obtain a larger system of polynomial equations with the same set of solutions. Let us try to use Proposition 3.7.5 again to bound the number of solutions. By computing a Gröbner basis of the associated ideal, we see that the new system of equations can be replaced by

\{ \begin{matrix}z^{2} + \frac{6}{5}x + 24y − \frac{13}{5}z = 0 \\ x^{2} + \frac{7}{5}x − 12y − \frac{6}{5}z = 0 \\ xy − \frac{3}{25}x + \frac{3}{5}y + \frac{3}{50}z = 0 \\ y^{2} + \frac{7}{250}x + \frac{9}{25}y − \frac{7}{500}z = 0 \\ xz − 2x = 0 \\ yz − \frac{3}{25}x − \frac{22}{5}y + \frac{3}{50}z = 0 \end{matrix}

This time Macaulay’s Basis Theorem yields dim_{ℚ}(P/J) = 4, i.e. we get a better bound for the number of solutions. Is this a good bound? Our next goal is to show that it is in fact optimal, i.e. that 4 is exactly the number of solutions of S.

For a system of equations f_{1} = ⋯ = f_{s} = 0 corresponding to a zerodimensional radical ideal I = (f_{1}, …, f_{s}), and for a perfect base field K, the solutions of the system are simple zeros of I in the sense of the following proposition. We note that a finite intersection of maximal ideals in P is clearly a radical ideal.

Proposition 3.7.18. Let I be a zero-dimensional radical ideal in P, let \overline{K} be the algebraic closure of K, and let \overline{P} = \overline{K}[x_{1}, …, x_{n}].

a) There are only finitely many maximal ideals 𝔪_{1}, …, 𝔪_{t} of P containing I, and the ideal I is their intersection I = 𝔪_{1} ∩ ⋯ ∩ 𝔪_{t}.

b) If K is a perfect field, then also the ideal I\overline{P} is a radical ideal. In particular, the ideal I\overline{P} is again the intersection of the finite set of maximal ideals containing it.

Proof. First we show claim a). Every maximal ideal 𝔪 containing I is zerodimensional by Corollary 3.7.3.a. Therefore also 𝔪\overline{P} is zero-dimensional by Corollary 3.7.3.c. By the Finiteness Criterion 3.7.1.a, this implies that Z(𝔪\overline{P}) is finite. So, there are finitely many maximal ideals \overline{𝔪}_{1}, …, \overline{𝔪}_{u} of \overline{P} containing 𝔪 \overline{P}, and for each of those we have \overline{𝔪}_{i}∩P = 𝔪. Using the same reasoning, we also see that I\overline{P} is contained in only finitely many maximal ideals of \overline{P}, and then it follows that I is contained in only finitely many maximal ideals 𝔪_{1}, …, 𝔪_{t} of P. Every element f of 𝔪_{1} ∩ ⋯ ∩ 𝔪_{t} lies in all maximal ideals of \overline{P} containing I\overline{P}. By Corollary 2.6.17, we therefore have f ∈ \sqrt{I} = I. Altogether, we get I = 𝔪_{1} ∩ ⋯ ∩ 𝔪_{t}.

Now we prove b). We note that, for i = 1, …, n, the Finiteness Criterion 3.7.1.c says that the ideal I ∩ K[x_{i}] is a principal ideal generated by a non-zero polynomial g_{i} ∈ K[x_{i}]. Because of the assumption that I is radical, the generator g_{i} of I ∩ K[x_{i}] has to be squarefree. Then we use the assumption that K is perfect and Proposition 3.7.9.d to see that gcd(g_{i}, g′_{i}) = 1. Hence, by Proposition 1.2.8.c, there exist polynomials h_{i}, h̃_{i} ∈ K[x_{i}] such that 1 = h_{i}g_{i} + h̃_{i}g′_{i}. This equation continues to hold in \overline{K}[x_{i}]. Thus we also have gcd(g_{i}, g′_{i}) = 1 if we view g_{i} and g′_{i} as elements of \overline{P}. Now we may apply Seidenberg’s Lemma 3.7.15 to I\overline{P}, and the proof is complete. □

If the system of polynomial equations S corresponds to a zero-dimensional radical ideal, and if the base field is perfect, the bound for the number of solutions given in Proposition 3.7.5 is sharp, i.e. we have the following formula for the exact number of solutions.

Theorem 3.7.19. (Exact Number of Solutions) Let I be a zero-dimensional radical ideal in P, let \overline{K} be the algebraic closure of K, and let \overline{P} = \overline{K}[x_{1}, …, x_{n}]. If K is a perfect field, the number of solutions of the system of equations S is equal to the number of maximal ideals of \overline{P} containing I\overline{P}, and this number is precisely dim_{K}(P/I).

Proof. Using Proposition 3.7.18.a, we write I = 𝔪_{1} ∩ ⋯ ∩ 𝔪_{t} with maximal ideals 𝔪_{1}, …, 𝔪_{t} of P, and we write 𝔪_{i} \overline{P} = \overline{𝔪}_{i1} ∩ ⋯ ∩ \overline{𝔪}_{iμ_{i}} with maximal ideals \overline{𝔪}_{i1}, …, \overline{𝔪}_{iμ_{i}} of \overline{P} for i = 1, …, t. Then the Chinese Remainder Theorem 3.7.4.b and Corollary 3.7.3.c allow us to calculate

dim_{K}(P/I)=∑_{i=1}^{t} dim_{K}(P/𝔪_{i}) = ∑_{i=1}^{t} dim\overline{K}(\overline{P} /𝔪 \overline{P})

=∑_{i=1}^{t} ∑_{j=1}^{μ_{i}} dim\overline{K}(\overline{P} /\overline{𝔪}_{ij}) = ∑_{i=1}^{t} μ_{i}

The last equality follows from Corollary 2.6.9. The number ∑_{i=1}^{t} μ_{i} is exactly the number of maximal ideals of \overline{P} containing I\overline{P}, i.e. the number of solutions of S. □

Now we know that the number of solutions of the system S in Example 3.7.17 is precisely 4. Can we find them?

Example 3.7.20. Consider the second system of polynomial equations contained in Example 3.7.17. Notice that the equation xz − 2x = 0 can be factored into x(z − 2) = 0. As in high school, we can split the system into two systems S_{1} and S_{2} . After interreducing the generators, these systems are given by

\{ \begin{matrix}z − 2 = 0 \\ x + 20y − 1 = 0 \\ y^{2} − \frac{1}{5}y = 0 \end{matrix}  and  \{ \begin{matrix}x = 0 \\ y + \frac{1}{10}z = 0 \\ z^{2} − 5z, = 0 \end{matrix}

Now it is easy to get the four solutions (1, 0, 2), (−3, \frac{1}{5}, 2), (0, 0, 0), (0, −\frac{1}{2}, 5).

Of course, most of the time we cannot use tricks like this one. Therefore we need a general strategy for finding the solutions. Such a strategy will be developed in the next subsection.

3.7.C Solving Systems Effectively

As a consequence of the above discussions, we shall from now on assume that we want to solve a system of polynomial equations f_{1} = … = f_{s} = 0 such that I = (f_{1}, …, f_{s}) is a zero-dimensional radical ideal in P = K[x_{1}, …, x_{n}]. Our next goal is to perform a linear change of coordinates in such a way that the resulting system of equations has the additional property that its solutions in \overline{K}^{n} have pairwise distinct last coordinates. Let us introduce the following name for this property.

Definition 3.7.21. Suppose that I is a zero-dimensional ideal in P, and let i ∈ {1, …, n}. We say that I is in normal x_{i} -position if any two zeros (a_{1}, …, a_{n}), (b_{1}, …, b_{n}) ∈ \overline{K}^{n} of I satisfy a_{i} ≠ b_{i}.

To bring a given zero-dimensional ideal into normal x_{n} -position, we may have to extend the base field (if it is finite) and to perform a linear change of coordinates. Our next proposition gives a precise condition when this is possible.

Proposition 3.7.22. Suppose that I is a zero-dimensional ideal in P, let t = dim_{K}(P/I), and assume that the field K contains more than \binom{t}{2} elements. Then there exists a tuple (c_{1}, …, c_{n−1}) ∈ K^{n−1} such that

c_{1}a_{1} + ⋯ + c_{n−1}a_{n−1} + a_{n} ≠ c_{1}b_{1} + ⋯ + c_{n−1}b_{n−1} + b_{n}

for all pairs of zeros (a_{1}, …, a_{n}), (b_{1}, …, b_{n}) ∈ \overline{K}^{n} of I. Consequently the linear change of coordinates given by x_{1} ↦ x_{1}, …, x_{n−1} ↦ x_{n−1} , and by x_{n} ↦ x_{n} − c_{1}x_{1} − ⋯ − c_{n−1}x_{n−1} transforms I into an ideal in normal x_{n} -position.

Proof. Let (a_{1}, …, a_{n}) and (b_{1}, …, b_{n}) be two distinct zeros of I in \overline{K}^{n}. In choosing the tuple (c_{1}, …, c_{n−1}) ∈ K^{n−1}, we have to avoid the solutions in K^{n−1} of the linear equation

(a_{1} − b_{1})x_{1} + ⋯ + (a_{n−1} − b_{n−1})x_{n−1} = a_{n} − b_{n}

These solutions are obtained by adding all solutions of the corresponding homogeneous equation to one of them. Thus there are at most (#K)^{n−2} of them. Altogether, we have to avoid at most \binom{t}{2} · (#K)^{n−2} tuples in K^{n−1}, which is clearly possible if #K > \binom{t}{2}. □

At this point it may be useful to remind the reader that the linear change of coordinates mentioned in this proposition transforms the ideal I into the ideal J = (f(x_{1}, …, x_{n−1}, x_{n} − c_{1}x_{1} − ⋯ − c_{n−1}x_{n−1}) | f ∈ I), and that a point (a_{1}, …, a_{n}) ∈ \overline{K}^{n} is a zero of I if and only if the point (a_{1}, …, a_{n−1}, a_{n} + c_{1}a_{1} + ⋯ + c_{n−1}a_{n−1}) is a zero of J (see also Exercise 6). To finish the discussion of how to bring a zero-dimensional ideal into normal x_{n} -position, it now suffices to explain how one can check whether it already is in normal x_{n} -position. For that, we shall have to pass to its radical ideal first. Then we use the following theorem.

Theorem 3.7.23. Let K be a perfect field, let P = K[x_{1}, …, x_{n}], let I ⊆ P be a zero-dimensional radical ideal, and let g_{n} be the monic generator of the ideal I ∩ K[x_{n}]. Then the following conditions are equivalent.

a) The ideal I is in normal x_{n} -position.

b) The degree of g_{n} is equal to dim_{K}(P/I).

c) The injection K[x_{n}] ⟶ P induces an isomorphism of K -algebras K[x_{n}]/(g_{n}) ≅ P/I.

Proof. By construction, the injection K[x_{n}] ⟶ P induces an injective K -algebra homomorphism K[x_{n}]/(g_{n}) ⟶ P/I. In particular, we have deg(g_{n}) = dim_{K}(K[x_{n}]/(g_{n})) ≤ dim_{K}(P/I). Now claim a) implies b), because the last component of every zero of I is a zero of g_{n} and g_{n} is squarefree. Hence we have deg(g_{n}) ≥ dim_{K}(P/I) by Theorem 3.7.19.

It is clear that b) implies c), because we have an injective K -algebra homomorphism K[x_{n}]/(g_{n}) ⟶ P/I, and both algebras have the same vector space dimension over K. Thus it remains to prove that c) implies a). We consider the reduced Gröbner basis G of I with respect to an elimination ordering σ for {x_{1}, …, x_{n−1}}. By Theorem 3.4.5.c, we have G ∩ K[x_{n}] = {g_{n}}. By Lemma 2.4.16.b, the set G is also the reduced σ -Gröbner basis of I\overline{P} ∩ \overline{K}[x_{n}], where \overline{K} is the algebraic closure of K. Thus the canonical map \overline{K}[x_{n}]/(g_{n}) ⟶ \overline{P} /I\overline{P} is injective. Using the hypothesis, we see that deg(g_{n}) = dim_{K}(P/I), and Corollary 3.7.3.c shows dim_{K}(P/I) = dim_{K}(\overline{P} /I\overline{P}). Hence the map \overline{K}[x_{n}]/(g_{n}) ⟶ \overline{P} /I\overline{P} is bijective.

By Theorem 3.7.19, the degree of g_{n} equals the number of zeros of I. Let d = deg(g_{n}), and let a_{1}, …, a_{d} ∈ \overline{K} be the zeros of g_{n}. The maximal ideals of the quotient ring \overline{K}[x_{n}]/(g_{n}) are the principal ideals generated by the residue classes of x_{n} − a_{i} for i = 1, …, d. Under the above isomorphism, they correspond to maximal ideals 𝔪_{i} of \overline{P} /I\overline{P}. By Corollary 2.6.9, each ideal 𝔪_{i} is the residue class ideal of an ideal of the form (x_{1} − α_{i1}, …, x_{n} − α_{in}) in \overline{P}, where α_{i1}, …, α_{in} ∈ \overline{K}. Since we have (x_{1} − α_{i1}, …, x_{n} − α_{in}) ∩ \overline{K}[x_{n}] = (x_{n} − a_{n}) by construction, it follows that α_{in} = a_{i} for i = 1, …, d. By Proposition 3.7.18.b, the squarefree polynomial g_{n} has pairwise distinct roots a_{1}, …, a_{d}. Therefore we see that the last coordinates of the zeros {(α_{i1}, …, α_{in}) | i = 1, …, d} of I are pairwise distinct. □

This theorem can be viewed as a generalization of a well-known result in field theory.

Remark 3.7.24. Let L/K be a finite field extension, i.e. let L ⊇ K be an extension field which is a finite dimensional K -vector space. Since every K -basis of L is also a system of generators of the K -algebra L, there exists a presentation L ≅ P/I, where P = K[x_{1}, …, x_{n}] is a polynomial ring over K, and where I ⊆ P is a maximal ideal.

Let t = dim_{K}(L). If the field K is perfect and has more than \binom{t}{2} elements, we can use Proposition 3.7.22 to find a linear change of coordinates such that the transform of I is in normal x_{n} -position. Then condition c) of the theorem shows that L is of the form L ≅ K[x]/(g) with an irreducible polynomial g ∈ K[x]. In other words, viewed as a K -algebra, the field L is generated by a single element.

In field theory, this result is called the Primitive Element Theorem. Although we are not going to treat this subject in greater detail, let us mention that the assumption that K is a perfect field is essential for the Primitive Element Theorem to hold, whereas the assumption that K has more than \binom{t}{2} elements can easily be dispensed with (see also Exercise 8).

The reason why we wanted to reduce our problem of solving a system of polynomial equations f_{1} = ⋯ = f_{s} = 0 to the case when I = (f_{1}, …, f_{s}) is a zero-dimensional radical ideal in normal x_{n} -position is the following theorem. It says that, in this situation, the reduced Lex-Gröbner basis of I has a very special shape. That is why it is sometimes called the Shape Lemma. Moreover, the special shape of this Gröbner basis enables us to write down formulas for all solutions of S in terms of the roots of a generator g_{n} of I ∩ K[x_{n}].

Theorem 3.7.25. (The Shape Lemma) Let K be a perfect field, let I ⊆ P be a zero-dimensional radical ideal in normal x_{n} -position, let g_{n} ∈ K[x_{n}] be the monic generator of the elimination ideal I ∩ K[x_{n}], and let d = deg(g_{n}).

a) The reduced Gröbner basis of the ideal I with respect to Lex is of the form {x_{1} − g_{1}, …, x_{n−1} − g_{n−1}, g_{n}}, where g_{1}, …, g_{n−1} ∈ K[x_{n}].

b) The polynomial g_{n} has d distinct zeros a_{1}, …, a_{d} ∈ \overline{K}, and the set of zeros of I is

Z(I) = {(g_{1}(a_{i}), …, g_{n−1}(a_{i}), a_{i}) | i = 1, …, d}

Proof. Since b) follows from a) by applying Theorem 3.7.19 to the zerodimensional radical ideal (g_{n}) ⊆ K[x_{n}], it suffices to prove claim a). From Theorem 3.7.23.c we deduce that, for each i ∈ {1, …, n}, the residue class x_{i} + I is a K -linear combination of 1 + I, …, x_{n}^{d−1} + I. Hence there exist g_{1}, …, g_{n−1} ∈ K[x_{n}] such that x_{i} −g_{i} ∈ I for i = 1, …, n−1. Now we show that {x_{1} − g_{1}, …, x_{n−1} − g_{n−1}, g_{n}} is the reduced Lex-Gröbner basis of I. Since those polynomials are in I, we have (x_{1}, …, x_{n−1}, x_{n}^{d}) ⊆ LT_{Lex}(I), and Macaulay’s Basis Theorem 1.5.7 implies that this is an equality. Therefore {LT_{Lex}(g_{1}), …, LT_{Lex}(g_{n})} is a minimal system of generators of LT_{Lex}(I). Furthermore, since deg(g_{i}) < d for i = 1, …, n − 1, the elements of this Gröbner basis are fully reduced. □

The last result of this section, its highlight, and in some sense also its true beginning, is the following corollary. It combines everything we learned before and gives a detailed recipe for solving systems of polynomial equations effectively, albeit not necessarily efficiently.

Corollary 3.7.26. (Solving Systems Effectively) Let K be a field of characteristic zero or a perfect field of characteristic p > 0 having effective p^{th} roots. Furthermore, let f_{1}, …, f_{s} ∈ P = K[x_{1}, …, x_{n}], and let I = (f_{1}, …, f_{s}). Consider the following sequence of instructions.

1) For i = 1, …, n, compute a generator g_{i} of the elimination ideal I ∩ K[x_{i}]. If g_{i} = 0 for some i ∈ {1, …, n}, then return "Infinite

   Solution Set" and stop.

2) Depending on the characteristic of K, use Proposition 3.7.9.b or Proposition 3.7.12 to compute h_{i} = sqfree(g_{i}) for i = 1, …, n. Then replace I by I + (h_{1}, …, h_{n}).

3) Compute d = #(𝕋^{n} \ LT_{σ}{I}).

4) Check if deg(h_{n}) = d. In this case, let (c_{1}, …, c_{n−1}) = (0, …, 0) and continue with step 8).

5) If K is finite, enlarge it so that it has more than \binom{d}{2} elements.

6) Choose (c_{1}, …, c_{n−1}) ∈ K^{n−1} . Apply the coordinate transformation x_{1} ↦ x_{1}, …, x_{n−1} ↦ x_{n−1} , x_{n} ↦ x_{n} − c_{1}x_{1} − ⋯ − c_{n−1}x_{n−1} to I and get an ideal J.

7) Compute a generator of J ∩ K[x_{n}] and check if it has degree d. If not, repeat steps 6) and 7) until this is the case. Then rename J and call it I.

8) Compute the reduced Gröbner basis of I with respect to Lex. It has the shape {x_{1} −g_{1}, …, x_{n−1} −g_{n−1}, g_{n}} with polynomials g_{1}, …, g_{n} ∈ K[x_{n}] and with deg(g_{n}) = d. Return the tuples (c_{1}, …, c_{n−1}) and (g_{1}, …, g_{n}) and stop.

This is an algorithm which decides whether the system of polynomial equations S given by f_{1} = ⋯ = f_{s} = 0 has finitely many solutions. In that case, it returns tuples (c_{1}, …, c_{n−1}) ∈ K^{n−1} and (g_{1}, …, g_{n}) ∈ K[x_{n}]^{n} such that, after we perform the linear change of coordinates x_{1} ↦ x_{1}, …, x_{n−1} ↦ x_{n−1} , x_{n} ↦ x_{n} − c_{1}x_{1} − ⋯ − c_{n−1}x_{n−1} , the transformed system of equations has the set of solutions {(g_{1}(a_{i}), …, g_{n−1}(a_{i}), a_{i}) | i = 1, …, d}, where a_{1}, …, a_{d} ∈ \overline{K} are the zeros of g_{n}.

In other words, the original system of equations has the set of solutions {(g_{1}(a_{i}), …, g_{n−1}(a_{i}), a_{i} − c_{1}g_{1}(a_{i}) − ⋯ − c_{n−1}g_{n−1}(a_{i})) | i = 1, …, d}.

Proof. The fact that step 1) checks correctly whether Z(I) is finite follows from Proposition 3.7.1. By Corollary 3.7.16, the ideal I is replaced by its radical \sqrt{I} in step 2). As we noticed after the proof of Corollary 3.7.16, we have \sqrt{I} ∩K[x_{i}] = (h_{i}) for i = 1, …, n. Now Theorem 3.7.19 and Macaulay’s Basis Theorem 1.5.7 imply that the number d computed in step 3) is exactly the number of solutions of our system of equations.

The ideal I is in normal x_{n} -position if and only if the degree of a generator of I ∩ K[x_{n}] is d (see Theorem 3.7.23). This is checked in step 4). If it does not hold, we have to find a suitable linear change of coordinates. In step 5) we enlarge the field K if necessary so that the hypothesis of Proposition 3.7.22 is satisfied. Then this proposition says that we eventually find a tuple (c_{1}, …, c_{n−1}) ∈ K^{n−1} in step 6) such that the corresponding linear change of coordinates puts I into normal x_{n} -position. In step 7) we check whether this has happened, and if not, we repeat step 6). Finally we are in the situation of the Shape Lemma. It yields the correctness of step 8) and the claim of the corollary. □

For more advanced readers we note that when we work over a finite field K and we arrive at step 6) of this algorithm, we can perform an exhaustive search of all tuples (c_{1}, …, c_{n−1}) ∈ K^{n−1}, and Proposition 3.7.22 guarantees that we will eventually find a suitable coordinate transformation. In the case of an infinite base field K, choosing random tuples (c_{1}, …, c_{n−1}) ∈ K^{n−1} seems to yield only a probabilistic algorithm, but using more refined tools one could show that it is actually deterministic.

Of course, if K = ℚ and if the zeros of the polynomial g_{n} can be represented using radicals, then this corollary provides us with actual formulas for the solutions of our system of equations S. More generally, if we accept the zeros a_{1}, …, a_{d} ∈ \overline{K} of g_{n} as symbols denoting certain algebraic numbers over K, we still get formulas for the solutions of S in terms of those symbols. If we want the minimal polynomials over K of the coordinates of those solutions, we can compute them using the methods described in Tutorial 17. We end this section with an example which shows how one can apply the preceding algorithm in a concrete case.

Example 3.7.27. Let us consider the following system of equations over K = ℚ. Let f_{1} = x_{1}^{2}+x_{2}^{2}+x_{3}^{2}−9, f_{2} = 3x_{1}^{2}−x_{2}^{2}x_{3} , and f_{3} = x_{1}^{2}x_{3}−2x_{2}^{2}+2 be three polynomials in P = ℚ[x_{1}, x_{2}, x_{3}] which define a system of polynomial equations f_{1} = f_{2} = f_{3} = 0. We let I = (f_{1}, f_{2}, f_{3}) and follow the steps of the algorithm in Corollary 3.7.26.

1) We compute I ∩ ℚ[x_{i}] = (g_{i}) for i = 1, 2, 3 and get the polynomials g_{1} = x_{1}^{6} + 12x_{1}^{4} − 12x_{1}^{2} − 32 ≠ 0, g_{2} = x_{2}^{8} − 16x_{2}^{6} − 9x_{2}^{4} + 108x_{2}^{2} + 108 ≠ 0, and g_{3} = x_{3}^{4} − 15x_{3}^{2} − 2x_{3} + 48 ≠ 0.

2) Since gcd(g_{i}, g′_{i}) = 1 for i = 1, 2, 3, those polynomials are squarefree and I is a radical ideal.

3) We compute d = #(𝕋^{3} \ LT_{Lex}(I)) = 16. Thus the number of solutions is 16.

4) Since deg(g_{3}) = 4 < 16, the ideal I is not yet in normal x_{3} -position.

5) Nothing has to be done, because K = ℚ is infinite.

6) We choose (c_{1}, c_{2}) = (−1, −1) and apply the corresponding coordinate transformation x_{1} ↦ x_{1} , x_{2} ↦ x_{2} , x_{3} ↦ x_{1} + x_{2} + x_{3} to compute J.

7) We compute a generator h_{3} of J ∩ ℚ[x_{3}] and get the polynomial h_{3} = x_{3}^{16} −72x_{3}^{14} +16x_{3}^{13} +⋯−338 079 047. Therefore the ideal J is in normal x_{3} -position. We rename J and call it I.

8) We compute the reduced Gröbner basis of I with respect to Lex and get {x_{1} − c_{15}x_{3}^{15} − ⋯ − c_{0}, x_{2} − d_{15}x_{3}^{15} − ⋯ − d_{0}, h_{3}} with numbers c_{0}, …, c_{15}, d_{0}, …, d_{15} ∈ ℚ which have approximately 30-digit numerators and denominators. Then we let h_{1} = c_{0} + ⋯ + c_{15}x^{15} and h_{2} = d_{0}+⋯+d_{15}x^{15} , and we return the tuples (−1, −1) and (h_{1}, h_{2}, h_{3}). Hint: If this calculation takes very long on your computer, you may want to first enlarge the system of generators of I by adding to it elements of other Gröbner bases, e.g. with respect to the various elimination orderings. The meaning of this result is that we can write the 16 solutions of S

as triples whose coordinates are polynomials in the zeros a_{1}, …, a_{16} ∈ \overline{ℚ} of h_{3} . In this particular example, there exists a way how we can simplify the computation. If we factor g_{3} , we get g_{3} = (x_{3} − 2)(x_{3}^{3} + 2x_{3}^{2} − 11x_{3} − 24). Therefore, instead of S, we can also solve the following two systems of polynomial equations.

1) If x_{3} = 2, we have the new system of equations

\{ \begin{matrix}x_{1}^{2} + x_{2}^{2} − 5 = 0 \\ 3x_{1}^{2} − 2x_{2}^{2} = 0 \\ x_{1}^{2} − x_{2}^{2} + 1 = 0 \end{matrix}

which easily yields the solutions (±\sqrt{2}, ±\sqrt{3}, 2) of the original system S.

2) In the system of equations f_{1} = f_{2} = f_{3} = 0 and x_{3}^{3}+2x_{3}^{2}−11x_{3}−24 = 0, the indeterminates x_{1} and x_{2} appear only quadratically. Thus we may substitute y_{1} = x_{1}^{2} , y_{2} = x_{2}^{2} , and y_{3} = x_{3} , and solve the system of equations

\{ \begin{matrix}h_{1} = y_{1} + y_{2} + y_{3}^{2} − 9 = 0 \\ h_{2} = 3y_{1} − y_{2}y_{3} = 0 \\ h_{3} = y_{1}y_{3} − 2y_{2} + 2 = 0 \\ h_{4} = y_{3}^{3} + 3y_{3}^{2} − 11y_{3} − 24 = 0 \end{matrix}

That system of equations simplifies in a straightforward way, and we get y_{1} = 4y_{3}^{2} −2y_{3} −40 and y_{2} = −5y_{3}^{2} +2y_{3} +49, so that the three solutions of h_{4} = 0 each give rise to four solutions of our original system S.

Exercise 1. Prove that a field K is perfect if and only if the following two conditions are equivalent for every polynomial f ∈ K[x] \ K.

a) The polynomial f is squarefree.

b) We have gcd(f, f′) = 1.

Exercise 2. Let p be a prime number, let K = 𝔽_{p} be the field with p elements, and let f ∈ K[x].

a) Write a CoCoA function IsPPower(…) which checks whether f is of the form f = g^{p} with a polynomial g ∈ K[x] and returns the corresponding Boolean value.

b) Write a CoCoA function PRoot(…) which takes a polynomial f of the form f = g^{p} such that g ∈ K[x] and computes g.

Exercise 3. Prove that a zero-dimensional prime ideal of P is maximal. Hint: Use Proposition 3.7.18.a.

Exercise 4. Find an example of a field K and a radical ideal I ⊆ K[x] such that I · \overline{K}[x] is not radical, where \overline{K} is the algebraic closure of K. Hint: Look at the polynomial x^{p} − y ∈ ℤ/(p)(y)[x].

Exercise 5. Let f = x^{5} − 4x^{4} + 10x^{2} − x − 3 ∈ ℚ[x]. Using for instance the CoCoA function Factor(…), check that its factorization in ℚ[x] is f = f_{1} · f_{2} , where f_{1} = x^{3} − 3x^{2} + 1 and f_{2} = x^{2} − x − 3.

a) Let g = x^{3} + ax^{2} + bx + c and h = x^{2} + dx + e be polynomials in ℚ[x, a, b, c, d, e]. We set f = g · h and compare the coefficients for the different powers of x. Solve the corresponding system S of polynomial equations and recover the above factorization. b) Let K = ℚ[e]/(e^{3} − 3e − 1), and let ε be the image of e in K. By

computing the reduced Lex-Gröbner basis of the ideal associated with the system S, show that g = x^{3} + (ε^{2} − 4)x^{2} − ε^{2}x − 3(ε^{2} − 3) and h = x^{2} − ε^{2}x + ε in K[x] satisfy f = g · h.

c) Do a) and b) contradict the unique factorization property of K[x]? Hint: Show that h | f_{1} in K[x].

d) Find the complete factorization of f in K[x], and then in \overline{ℚ}[x].

Exercise 6. Let K be a field, let I be an ideal in P = K[x_{1}, …, x_{n}], let (c_{1}, …, c_{n−1}) ∈ K^{n−1} , and let φ : P ⟶ P be the linear change of coordinates which is defined by x_{1} ↦ x_{1}, …, x_{n−1} ↦ x_{n−1} , and by x_{n} ↦ x_{n} − c_{1}x_{1} − ⋯ − c_{n−1}x_{n−1} .

a) Show that φ is a K -algebra isomorphism and describe J = φ(I).

b) Prove that a tuple (a_{1}, …, a_{n}) ∈ \overline{K}^{n} is a zero of I if and only if the tuple (a_{1}, …, a_{n−1}, a_{n} + c_{1}a_{1} + ⋯ + c_{n−1}a_{n−1}) is a zero of J.

Exercise 7. Let P = ℚ[x_{1}, …, x_{n}], and let I ⊆ P be a zero-dimensional radical ideal.

a) Write a CoCoA function IsNormalPos(…) which checks whether I is in normal x_{n} -position and returns the corresponding Boolean value.

b) Write a CoCoA function NormalPosTrafo(…) which computes a tuple of rational numbers (c_{1}, …, c_{n−1}) ∈ ℚ^{n−1} such that the linear change of coordinates which is defined by x_{1} ↦ x_{1} , …, x_{n−1} ↦ x_{n−1} , and by x_{n} ↦ x_{n} − c_{1}x_{1} − ⋯ − c_{n−1}x_{n−1} transforms I into an ideal in normal x_{n} -position. (Of course, if I is already in normal x_{n} -position, your function should return the zero vector.)

Exercise 8. Let K be a perfect field, and let L/K be a finite field extension. Prove that there exists an irreducible polynomial g ∈ K[x] and an isomorphism L ≅ K[x]/(g). (Hint: If K is finite, look at Tutorial 3.)

Tutorial 42: Strange Polynomials

Let us remind you of Section 0.10 in the introduction of this book. There we claimed that even polynomials in a single indeterminate over a field are not as simple as one would think. Of course, you are familiar with the phenomenon where one multiplies two polynomials, and a lot of cancellation occurs so the result is simpler than either of the factors. But what about the following claim? Given any ε > 0, there exists a polynomial f ∈ ℚ[x] such that the number of terms of Supp(f^{2}) is less than ε times the number of terms of Supp(f). Would you believe this? For instance, with ε = 0.001 we are talking about a polynomial which has a thousand times more terms than its square. If you doubt that such a polynomial could ever exist, do not worry. Below you will prove it.

In this tutorial, we shall show you how to construct some strange polynomials, i.e. some polynomials having unexpected properties. For a polynomial f ∈ ℚ[x], we let ℓ(f) = # Supp(f). We shall say that f is a dense polynomial if ℓ(f) = deg(f) + 1. To get started, we treat the following question.

Is it possible that f is dense, but f^{2} is not?

In the remainder of this tutorial, we let f ∈ ℚ[x] be a dense univariate polynomial of degree d = deg(f) > 0. We let f = a_{d}x^{d} +a_{d−1}x^{d−1} +⋯+a_{0} , where a_{0}, …, a_{d} ∈ ℚ.

a) Show that if deg(f) = 1, then f^{2} is dense.

b) Show that if deg(f) ≥ 2, then ℓ(f^{2}) ≥ 4.

c) Let a ∈ ℚ \ {0}. Show that the following maps T_{i} : ℚ[x] ⟶ ℚ[x] induce bijective maps on the set of dense polynomials which preserve both ℓ(f) and ℓ(f^{2}).

1) T_{1}(f) = af

2) T_{2}(f) = f(ax)

3) T_{3}(f) = x^{d}f(\frac{1}{x})

d) Using T_{1} , show that, for answering our question, we may assume that f is monic.

e) Assume that f is monic, i.e. that we have f = x^{d} + a_{d−1}x^{d−1} + ⋯ + a_{0} . Consider a_{0}, …, a_{d−1} as indeterminates over ℚ. Next, write f^{2} in the form f^{2} = x^{2d}+b_{2d−1}x^{2d−1}+⋯+b_{0} with b_{0}, …, b_{2d−1} ∈ ℚ[a_{0}, …, a_{d−1}]. Prove that deg(b_{i}) ≤ 2 for i = 0, …, 2d − 1.

f) Prove that there exists a non-empty Zariski-open subset U ⊆ 𝔸_{ℚ}^{d} such that, for every (a_{0}, …, a_{d−1}) ∈ U, the corresponding monic polynomial f satisfies ℓ(f^{2}) = 2 deg(f)+1, i.e. it has a dense square. (For the definition of the Zariski topology on 𝔸_{ℚ}^{d}, see Tutorial 27.)

g) For f = x^{2} + a_{1}x + a_{0} , describe the set U explicitly. Find an example such that ℓ(f) < 5 = 2 deg(f) + 1.

h) Show that if deg(f) = 2 and f is dense, then 4 ≤ ℓ(f^{2}) ≤ 5. Hence quadratic polynomials satisfy ℓ(f) < ℓ(f^{2}).

i) Show that 4 is the first degree for which there exists a dense polynomial f ∈ ℚ[x] with ℓ(f) = ℓ(f^{2}). Exhibit such an example. Altogether, we have shown that there exists a maximum value for ℓ(f^{2}),

namely 2 deg(f) + 1, which is achieved by most polynomials, but there are examples where this maximum is not achieved. In fact, we have seen that ℓ(f^{2}) = ℓ(f) = deg(f) + 1 is possible. Now we become even more ambitious and ask the following question.

Is it possible that f is dense and ℓ(f^{2}) < ℓ(f)?

Our next goal is to show that this question has a positive answer, too. But in order to find an example of such a polynomial, one has to go at least to degree 12. More precisely, we shall explain how you can prove that there are no examples of degree ≤ 11.

As before, we let f = x^{d} + a_{d−1}x^{d−1} + ⋯ + a_{0} ∈ ℚ[x] be a dense polynomial. The first possibility for ℓ(f^{2}) < ℓ(f) = d + 1 occurs when ℓ(f^{2}) = d. It turns out to be easiest to look for f such that ℓ(f^{2}) ≤ d.

j) Consider the polynomial

f = (x^{6} + \frac{2}{5}x^{5} − \frac{2}{25}x^{4} + \frac{4}{125}x^{3} − \frac{2}{125}x^{2} + \frac{2}{125}x + \frac{1}{125})(x^{6} + α)

where α is one of the six values α_{1} = −\frac{1}{110} , α_{2} = −\frac{1}{253} , α_{3} = −\frac{2}{55} , α_{4} = \frac{1}{15625·α_{1}} = −\frac{110}{15625} , α_{5} = \frac{1}{15625·α_{2}} = −\frac{253}{15625} , or α_{6} = \frac{1}{15625·α_{3}} = −\frac{11}{6250} . Use CoCoA to check that ℓ(f) = 13, while ℓ(f^{2}) = 12. For instance, in the case α_{1} = −\frac{1}{110} , we obtain the example printed in Section 0.10.

k) Apply T_{2} and T_{1} to the above polynomial f to produce another dense polynomial g of degree 12 such that g = x^{12} + x^{11} + ⋯ and ℓ(g^{2}) = 12.

l) Show that there exist finitely many systems of d+2 polynomial equations over the ring ℚ[a_{0}, …, a_{d−2}, x] such that at least one of them has a solution if and only if there exists a dense polynomial f which satisfies ℓ(f^{2}) ≤ d. Hint: In view of part i), it suffices to consider the case d ≥ 4. Using T_{1} and T_{2} , we may assume that a_{d} = a_{d−1} = 1 and that the coefficients b_{2d}, b_{2d−1}, b_{1}, b_{0} of f^{2} are different from zero. Therefore at least d + 1 coefficients of f^{2} among the remaining 2d−3 have to vanish. Finally, we need to add one equation which expresses the fact that the coefficients of f are non-zero (see Proposition 3.5.6).

m) Let d = 5. Write a CoCoA program StrangeSystems(…) which finds the ideals associated to the systems described in part l). Then use Corollary 2.6.14 and suitable Gröbner basis computations with CoCoA to show that there is no dense polynomial f ∈ \overline{ℚ}[x] of degree five such that ℓ(f^{2}) ≤ 5.

n) Try to do the computation for d = 6 and higher. Be careful that, as the degree of f increases, the number of systems to be checked grows tremendously. Give an estimate of this number depending on deg(f). In the last part of this tutorial, we shall show that even the following

daring question has a positive answer.

For every ε > 0, is there a dense f ∈ ℚ[x] with ℓ(f^{2}) < ε · ℓ(f)?

o) Let f ∈ ℚ[x] be a dense polynomial. Show that g(x) = f(x) · f(x^{2d+1}) satisfies ℓ(g) = ℓ(f)^{2} . (Hint: Think of g as consisting of d + 1 copies of f, multiplied by various terms and scalars.)

p) In the situation of o), show that ℓ(g^{2}) = ℓ(f^{2})^{2} . (Hint: Let h = f^{2} and note that g(x)^{2} = h(x) · h(x^{2d+1}).)

q) Now let f be one of the polynomials in j), and let g(x) = f(x) · f(x^{25}).

Show that \frac{ℓ(g^{2})}{ℓ(g)} = (\frac{ℓ(f^{2})}{ℓ(f)})^{2} = (\frac{12}{13})^{2} . By repeating this process, prove that the above question has a positive answer.

Tutorial 43: Primary Decompositions

Although the computation of the primary decomposition of a polynomial ideal is one of the most advanced operations in Computational Commutative Algebra, we shall now try to perform the first few steps in this direction. Naturally, this tutorial requires somewhat higher algebraic skills than the ones before.

Given a ring R, an ideal 𝔮 ⊂ R is called a primary ideal if every zerodivisor in R/𝔮 is a nilpotent element. Equivalently, we are asking that, for all a, b ∈ R such that ab ∈ 𝔮 and a ∉ 𝔮, there exists a number i ≥ 1 such that b^{i} ∈ 𝔮.

In the sequel we assume that R is a Noetherian ring.

a) Prove that the radical of a primary ideal 𝔮 is a prime ideal 𝔭. We shall say that the ideal 𝔮 is 𝔭-primary.

b) Prove that an ideal 𝔮 in R is 𝔭-primary if and only if there exists exactly one associated prime of R/𝔮, namely the prime 𝔭. (For the definition of an associated prime, see Tutorial 31.e.)

c) An ideal 𝔮 in R is called irreducible if it cannot be written as the intersection of two ideals, both of which properly contain it. Show that every irreducible ideal 𝔮 in R is a primary ideal. Hint: Assume that there are two different associated primes of R/𝔮 and deduce a contradiction.

d) Using c) and the fact that R is Noetherian, prove that every ideal in R can be written as a finite intersection of primary ideals. Such a representation is called a primary decomposition of the ideal. Hint: Consider the largest ideal in R which is not an intersection of finitely many irreducible ideals. In the remaining part of this tutorial, we want to compute primary de-

compositions for zero-dimensional ideals in the ring P = K[x_{1}, …, x_{n}] over a perfect field K. If char(K) = p > 0, we also assume that K has effective p^{th} roots. We have seen that one can compute \sqrt{I} in this case, and that \sqrt{I} is the intersection of finitely many maximal ideals in P.

e) Write a CoCoA function ZeroDimRad(…) which takes a zero-dimensional ideal I ⊆ P and computes \sqrt{I} using the method of Corollary 3.7.16. Hint: The base field K is ℚ or 𝔽_{p}. You may want to use the function SqFree(…) from Tutorial 5.

f) Apply your function ZeroDimRad(…) to compute the radicals of the following zero-dimensional ideals.

1) I_{1} = (x^{3}, x^{2}y + x, y^{2}) in ℚ[x, y]

2) I_{2} = (x^{27} + y^{27} + 1, x^{18} − x^{9}y^{9} − x^{9}) in ℤ/(3)[x, y]

3) I_{3} = (z^{2}, y^{2}z + yz, xz + yz, y^{4} + 2y^{3} + y^{2}, xy^{2} + y^{3} + xy + y^{2}, x^{2} + 2xy + y^{2}) in ℚ[x, y, z]

4) I_{4} = (z^{7}, y^{98} + y^{49}, x^{49} + y^{49}) in ℤ/(7)[x, y, z] g) Suppose that \sqrt{I} = 𝔪_{1} ∩ ⋯ ∩ 𝔪_{t} with maximal ideals 𝔪_{1}, …, 𝔪_{t} in P.

For i = 1, …, t, let 𝔮_{i} = I :_{P} (I :_{P} 𝔪_{i}^{∞}). Show that 𝔮_{i} is a 𝔪_{i} -primary ideal for i = 1, …, t, and that I = 𝔮_{1}∩⋯∩𝔮_{t} is a primary decomposition of I. Hint: Start with a primary decomposition I = 𝔮′_{1} ∩ ⋯ ∩ 𝔮′_{u}. Show that u = t and that we can assume 𝔪_{i} = \sqrt{𝔮′_{i}} for i = 1, …, t. Then apply the Chinese Remainder Theorem 3.7.4 to P/I and prove 𝔮′_{i} = 𝔮_{i} for i = 1, …, t. Thus we can reduce the computation of a primary decomposition of a

zero-dimensional ideal to the case of a zero-dimensional radical ideal. From now on, let I be a zero-dimensional radical ideal in P.

h) Write a CoCoA function IsNormalPos(…) which checks whether I is in normal x_{i} -position for some i ∈ {1, …, n} and returns FALSE or the corresponding i.

i) Apply your function IsNormalPos(…) to check whether the following zero-dimensional ideals are in normal x_{i} -position for some i ∈ {1, …, n}.

1) I_{5} = (x^{2} + y^{2} − 1, 4xy − 2x − 2y + 1) in ℚ[x, y]

2) I_{6} = (x^{2} − y, x^{2} − 3x + 2) in ℚ[x, y]

3) I_{7} = (yz + z, y^{2} + y, x + y + z, z^{2} − z) in ℚ[x, y, z]

j) Suppose that I is not in normal x_{i} -position for any i ∈ {1, …, n}. Write a CoCoA function NormalPosTrafo(…) which computes an index i ∈ {1, …, n} and a tuple (c_{1}, …, c_{n−1}) ∈ K^{n−1} such that the linear change of coordinates which is defined by x_{j} ↦ x_{j} for j ≠ i and by x_{i} ↦ x_{i} − c_{1}x_{1} − ⋯ − c_{i−1}x_{i−1} − c_{i}x_{i+1} − ⋯ − c_{n−1}x_{n} transforms I into an ideal in normal x_{i} -position. Hint: If char(K) = 0 and if you did Exercise 7, you may use your results. If char(K) = p > 0, try all possible coordinate changes. In case none of them works, exit the program with an error message.

k) Use your function NormalPosTrafo(…) to find transformations which bring the following ideals into normal x_{i} -position for some i ∈ {1, …, n}.

1) I_{8} = (x^{2} + y^{2} + 3, x^{2} − y^{2} + 1) in ℚ[x, y]

2) I_{9} = (xy, x^{2} + x, y^{3} + y^{2} + y) in ℤ/(2)[x, y]

3) I_{10} = (x^{3} − x, y^{2} + y, z^{2} − z) in ℤ/(3)[x, y, z] In view of the preceding results, we shall from now on assume that there

exists an i ∈ {1, …, n} such that the ideal I is in normal x_{i} -position.

l) Using Theorem 2.6.6, prove that I ∩ K[x_{j}] ≠ (0) for j = 1, …, n.

m) Let p_{i} ∈ K[x_{i}] be the monic generator of I ∩K[x_{i}], and let p_{i} = f_{i1} ⋯ f_{it} be the decomposition of p_{i} into monic irreducible factors. Show that the polynomials f_{i1}, …, f_{it} are pairwise distinct, and that I + (f_{ij}) is a maximal ideal for j = 1, …, t. Hint: Let 𝔪 and 𝔪′ be two maximal ideal containing I + (f_{ij}). Show that 𝔪 ∩ K[x_{i}] = 𝔪′ ∩ K[x_{i}] = (f_{ij}), and that 𝔪 and 𝔪′ are in normal x_{i} -position. Conclude that 𝔪 and 𝔪′ have the same zeros in \overline{K}^{n}. n) In this situation, let 𝔪_{j} = I + (f_{ij}) for j = 1, …, t. Prove that we have

I = 𝔪_{1} ∩ ⋯ ∩ 𝔪_{t}. Hint: Proceed as in the proof of Seidenberg’s Lemma 3.7.15.

o) Find an example of a zero-dimensional radical ideal I ⊆ P such that I ∩ K[x_{i}] is a maximal ideal for i = 1, …, n, but I is not a maximal ideal. Thus the assumption about the normal position is essential in the argument above.

p) Now combine the results achieved so far and develop an algorithm which computes the primary decomposition of a zero-dimensional radical ideal I. Implement this algorithm in a CoCoA function RadicalDec(…). Hint: Use the built-in CoCoA function Factor(…) to compute the factorization of the element p_{i}.

q) Apply your function RadicalDec(…) to compute the primary decomposition of the following zero-dimensional radical ideals.

1) I_{11} = (y^{3}−2y^{2}−2y−3, xy^{2}+xy−2y^{2}+x−2y−2, 13x^{2}−5y^{2}−5y+8) in ℚ[x, y]

2) I_{12} = (2y^{2} − y, x − y, 2yz + z^{2} − y − z, 2z^{3} − z^{2} + y − z) in ℚ[x, y, z]

3) I_{13} = (x^{2} − x, y^{2} − y, z^{2} − z, xy, xz, yz) in ℤ/(3)[x, y, z]

r) Finally, write a CoCoA function PrimaryDec(…) which checks whether a given ideal I is zero-dimensional and computes a primary decomposition of I in that case. Hint: Use the Finiteness Criterion 3.7.1 and the functions you wrote before. For the computation of the saturation and the colon ideal in part g), you can use the built-in CoCoA functions or the results of Tutorials 31 and 37.

s) Apply your function PrimaryDec(…) to compute the primary decompositions of the ideals I_{1}, …, I_{13} and of the following ideals.

1) I_{14} = (4xy^{3} − 6xy^{2} − 2y^{3} − x^{2} + 3y^{2} + 2x − 1, 2x^{2}y + 2xy^{2} − x^{2} − 4xy − y^{2} + 2x + 2y − 1) in ℚ[x, y]

2) I_{15} = (x^{2} + y^{2} + z^{2} + 1, y^{2}z + yz^{2} + yz, xy^{2} + y^{3} + yz^{2} + xy + y, y^{4} + y^{2}, z^{4} + z^{2}, yz^{3} + yz^{2}, xz^{2} + yz^{2} + z^{3} + xz + yz + z, xyz) in ℤ/(2)[x, y, z]

3) I_{16} = (x^{3} + y^{3} − z^{3} + xy − x − y, xz − yz, xy^{2} − xy − y^{2} + y, x^{2}y − x^{2} − xy + x, y^{4} − y^{3}) in ℤ/(3)[x, y, z] Tutorial 44: Modern Portfolio Theory

Bull Markets

are born on pessimism, grow on skepticism, mature on optimism, and die on euphoria. (John Templeton)

With this, the final, tutorial we venture where few algebraists have gone before. Indeed, we want to apply Computational Commutative Algebra to some problems of mathematical finance. Modern portfolio theory originated with the doctoral dissertation of H. Markowitz, has been studied extensively in economic circles, is widely believed and applied on Wall Street, and even earned its author a Nobel Prize. But no applications of Computational Commutative Algebra to this area were known to us. Thus is was time to invent something!

What is modern portfolio theory about?

Let us begin this journey by explaining the main problem of portfolio theory. Suppose we have a certain number of investments available, for instance stocks, bonds, real estate, cash, gold, etc. Moreover, suppose we know the prices of those investments at certain dates in the past, for instance at the end of each of the last 20 years. Now the problem of portfolio theory consists in distributing the available money in those investments in such a way that the expected future value of the portfolio is as high as possible, while at the same time the risk that this expectation is badly disappointed is held to a minimum.

How can one describe this problem mathematically?

To solve this problem, modern portfolio theory proposes to use the following mathematical model. Suppose that there exist n investments from which we can choose. Let {t_{0}, …, t_{N}} be the points in time at which we know the prices of these investments. For simplicity, we assume that t_{i} is, for every i ∈ {1, …, N}, of the form t_{i} = t_{0} + i · Δt with a fixed time period Δt. For i = 1, …, n, let A_{i} : {t_{0}, …, t_{N}} ⟶ ℚ_{>0} be the function whose values are the prices of the i^{th} investment.

Next, we set Ω = {t_{1}, …, t_{N}}, and, for i = 1, …, n, we consider the maps

X_{i} : Ω ⟶ ℚ_{>0} defined by t_{j} ⟼ \frac{A_{i}(t_{j})+B_{i}(t_{j})}{A_{i}(t_{j−1})}

where B_{i}(t_{j}) is the income derived from the i^{th} investment during the period [t_{i−1}, t_{i}], for instance a stock dividend or an interest payment. The function X_{i} is called the total return of the i^{th} investment.

Now a portfolio is a tuple (a_{1}, …, a_{n}) ∈ ℝ_{>0}^{n} such that a_{1}+⋯+a_{n} = 1. Here a_{i} represents the portion of the initial capital which is allocated to the i^{th} investment. Consequently, the function X = a_{1}X_{1}+⋯+a_{n}X_{n} represents the total return of the portfolio.

And how does one recognize a “good” portfolio?

In order to define what we mean by a “high expected return” and a “low risk” of the portfolio, we now have to make Ω into a discrete probability space. Don’t worry! We do not expect that you know what this is. For our purposes, the following definitions will be sufficient. (For experts we remark that the map p which assigns to each subset S ⊆ Ω the number p(S) = \frac{#S}{N} is used to define the uniform distribution on Ω.)

For i = 1, …, n, the number E(X_{i}) = \frac{1}{N} ∑_{k=1}^{N} X_{i}(t_{k}) is called the expected return of the i^{th} investment. (In probability theory, one would say that E(X_{i}) is the expected value of the random variable X_{i}.) Similarly, the number

E(X) = \frac{1}{N} ∑_{j=1}^{N}(a_{1}X_{1}(t_{j}) + ⋯ + a_{n}X_{n}(t_{j})) = a_{1}E(X_{1}) + ⋯ + a_{n}E(X_{n})

is called the expected return of the portfolio (a_{1}, …, a_{n}).

Furthermore, for i = 1, …, n, the number Var(X_{i}) = \frac{1}{N} ∑_{k=1}^{N}(X_{i}(t_{k}) − E(X_{i}))^{2} is called the variance of X_{i}, and the number σ(X_{i}) = \sqrt{Var(X_{i})} is called the standard deviation of X_{i}. For i, j ∈ {1, …, n}, the number Cov(X_{i}, X_{j}) = \frac{1}{N} ∑_{k=1}^{N}(X_{i}(t_{k}) − E(X_{i}))(X_{j}(t_{k}) − E(X_{j})) is called the covariance of X_{i} and X_{j}, and if σ(X_{i})σ(X_{j}) ≠ 0, the number ϱ(X_{i}, X_{j}) = Cov(X_{i}, X_{j})/(σ(X_{i})σ(X_{j})) is called the correlation coefficient of X_{i} and X_{j}.

At this point, it is time for you to start working. But let us insert a few cautionary remarks here. The tasks we assign in this tutorial are generally less well-defined than in the tutorials before. Moreover, the level of difficulty is somewhat higher than usual. However, we think that the rewards you can reap by solving all parts make the effort worthwhile.

a) Suppose that the investments are given by the lists of values of their total return functions X_{i} : Ω ⟶ ℚ_{>0} . Write CoCoA functions ExpRet(…), VarRet(…), and CovRet(…) which take these lists and a number d ≥ 1 and compute E(X_{i}), Var(X_{i}), and Cov(X_{i}, X_{j}) up to d decimal places.

b) Apply these functions to the following lists L_{i} = [X_{i}(t_{1}), …, X_{i}(t_{N})].

1) L_{1} = [0.935, 0.989, 1.132, 0.687, 0.648, 1.408, 1.083, 0.816, 0.902, 1.035, 1.429, 1.034, 1.229, 1.333, 1.144, 1.022, 0.907, 0.839, 1.208, 1.271]

2) L_{2} = [0.713, 1.067, 1.133, 0.739, 1.014, 1.402, 0.904, 1.079, 1.047, 0.865, 0.966, 1.02, 1.127, 1.4, 1.061, 1.664, 1.048, 0.698, 1.328, 1.348]

3) L_{3} = [1.078, 1.118, 1.609, 1.167, 0.702, 1.09, 1.046, 1.177, 1.181, 0.831, 1.461, 1.207, 1.032, 1.434, 1.331, 1.104, 1.43, 1.222, 1.53, 1.069]

4) L_{4} = [0.981, 1.058, 1.063, 0.99, 0.992, 1.094, 1.056, 1.154, 1.083, 0.998, 0.999, 0.947, 1.137, 1.094, 1.079, 1.081, 1.071, 1.08, 1.04, 1.001] 5) L_{5} = [0.992, 1.042, 1.456, 1.437, 1.532, 0.805, 0.872, 1.056, 1.161, 2.056, 1.445, 0.79, 1.164, 0.988, 0.933, 0.815, 0.953, 1.029, 0.954, 0.957]

c) For i, j = 1, …, n, show that the following claims hold. 1) Cov(X_{i}, X_{i}) = Var(X_{i})

2) −1 ≤ ϱ(X_{i}, X_{j}) ≤ 1

Hint: Without giving a proof, use the Cauchy-Schwarz inequality | ∑_{k=1}^{N} x_{k}y_{k}|^{2} ≤ (∑_{k=1}^{N} x_{k}^{2})(∑_{k=1}^{N} y_{k}^{2}) for x_{k}, y_{k} ∈ ℝ.

d) For the variance Var(X) = \frac{1}{N} ∑_{k=1}^{N}(X(t_{k}) − E(X))^{2} , prove

Var(X) = ∑_{i,j=1}^{N} a_{i}a_{j} Cov(X_{i}, X_{j})
= ∑_{i=1}^{n} a_{i}^{2} Var(X_{i}) + 2 ∑_{1≤i<j≤n} a_{i}a_{j} Cov(X_{i}, X_{j})

Using these numbers, modern portfolio theory considers the expected return E(X) of a portfolio as a measure of its “expected future value” and the standard deviation σ(X) or the variance Var(X) as a measure for the “risk” associated with this portfolio. Thus a portfolio (a_{1}, …, a_{n}) is called efficient if every other portfolio (b_{1}, …, b_{n}) with the same variance satisfies E(b_{1}X_{1} + ⋯ + b_{n}X_{n}) ≤ E(a_{1}X_{1} + ⋯ + a_{n}X_{n}), and if every other portfolio (c_{1}, …, c_{n}) with the same expected return satisfies Var(c_{1}X_{1} + ⋯ + c_{n}X_{n}) ≥ Var(a_{1}X_{1} + ⋯ + a_{n}X_{n}). The set of all efficient portfolios is called the efficient frontier.

Thus, altogether, we see that the main problem of portfolio theory becomes the computation of the efficient frontier when the available investments are given via their total return functions X_{1}, …, X_{n} : Ω ⟶ ℚ_{>0} .

How can one compute the efficient frontier?

To simplify our notation, let e_{i} = E(X_{i}), let v_{i} = Var(X_{i}), and let c_{ij} = Cov(X_{i}, X_{j}) for i, j = 1, …, n. We shall suppose that the numbers e_{i}, v_{i}, and c_{ij} are given rational numbers. Given a portfolio (a_{1}, …, a_{n}), we let e = E(X) and v = Var(X) be the expected return and the variance of the corresponding function X = a_{1}X_{1} + ⋯ a_{n}X_{n}. Our discussion so far shows that the following equations hold.

(1) 0 = a_{1} + ⋯ + a_{n} − 1

(2) 0 = a_{1}e_{1} + ⋯ + a_{n}e_{n} − e

(3) 0 = ∑_{i=1}^{n} a_{i}^{2}v_{i} + 2 ∑_{1≤i<j≤n} a_{i}a_{j}c_{ij} − v

In order to compute one efficient portfolio, we may consider v as a given number (“risk level”) and try to optimize e in (2) under the side conditions (1), (3). The method of Lagrange multipliers says that the maximum of e occurs when the partial derivatives of (2) with respect to the indeterminates a_{1}, …, a_{n} are linear combinations of the partial derivatives of (1) and (3).

e) Using the method of Lagrange multipliers, show that the following additional equations have to be satisfied for certain ℓ, m ∈ ℚ.

(4)  0 = e_{i} − ℓ − m (2a_{i}v_{i} + ∑_{j≠i} a_{j}c_{ij})  for i = 1, …, n

f) Write a CoCoA function PFEqn(…) which computes an ideal I in the ring ℚ[a_{1}, …, a_{n}, e, v, ℓ, m] which is generated by n + 3 polynomials corresponding to equations (1), (2), (3), and (4).

g) Prove that, in general, the ideal J = I ∩ ℚ[e, v] is a non-zero principal ideal generated by a quadratic polynomial of the form v − q(e). Hint: Divide equation (4) by m and assume that all denominators and determinants are non-zero. Every point on the parabola defined by v = q(e) in the (v, e)-plane

corresponds to a portfolio if the associated tuple (a_{1}, …, a_{n}) consists of non-negative numbers. By construction, such a portfolio satisfies the first property of an efficient portfolio. In fact, one can show that it is an efficient portfolio. Notice that, for every non-empty subset S ⊆ {1, …, n}, we can repeat this construction for the corresponding subset of investments and get a parabola defined by an equation v = q_{S}(e).

h) Write a CoCoA program AllParab(…) which computes the list of all 2^{n} − 1 quadratic polynomials v − q_{S}(e). Hint: First, you may want to write a CoCoA function which computes all non-empty subsets S of {1, …, n}.

i) Implement a CoCoA function IntPoints(…) which calculates a matrix containing approximations of all points of intersection of the “upper halves” of the parabolas Z(v − q_{S}(e)). Hint: To find approximations for the solutions of a quadratic equation in one indeterminate, you may use the functions Round(…) and Sqrt(…) explained in Appendix C.5.

j) Apply your functions AllParab(…) and IntPoints(…) in the case of the five investments of part b).

k) The points of intersection computed by IntPoints(…) subdivide the upper half of each parabola Z(v − q_{S}(e)) into a number of segments. Show that on each parabola there exists at most one segment whose points correspond to portfolios. Thus the parts of the efficient frontier are made up of segments of parabo-

las corresponding to portfolios where a_{i} = 0 for some indices i ∈ {1, …, n}, i.e. to portfolios which involve only a proper subset of the set of available investments. Clearly, there exists one portfolio for which v attains the minimal possible value v_{min} . We call it the minimal risk portfolio. The situation can be illustrated as follows.

._{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.}_{.} _{.}_{.}_{.}_{.}_{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}  v e  • •  • efficient fontier possible porfolios ........................................................................................................................................................................................................................................................................................................................................................................................................................................................... ................................................^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}  ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.} ^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.}^{.} ^{.} ^{.}

l) Write a CoCoA function MinPF(…) which computes the minimal risk portfolio (a_{1}, …, a_{n}).

m) Apply your function MinPF(…) to compute the minimal risk portfolio for the five investments of part b).

n) Implement a CoCoA function Frontier(…) which computes the different pieces of parabolas which constitute the efficient frontier and their points of intersection. Hint: Notice that you can easily decide which parabola is the “higher” one from their point of intersection onwards by comparing their leading coefficients.

o) Compute the efficient frontier for the five investments of part b).

What is the “best” efficient portfolio?

Naturally, the answer to this question depends partially on the type of investor for whom the portfolio is constructed. But, astonishingly, there is a nice rule which identifies one point on the efficient frontier which has the property that the corresponding portfolio has the highest return if one continues the investment process over many time periods.

To motivate this rule, we use some deeper results from probability theory. It is not necessary that you know them in order to solve this part of the tutorial, but the overall level of difficulty is somewhat higher than before. Let W_{0} be the initial capital. The value of a portfolio (a_{1}, …, a_{n}) after i time periods is W_{i} = W_{0} · ∏_{j=1}^{i} X(t_{j}), where X = a_{1}X_{1} + ⋯ + a_{n}X_{n}. Thus we have ln(\frac{W_{i}}{W_{0}} ) = ∑_{j=1}^{i} ln(X(t_{j})). The strong law of large numbers now says that

lim_{i→∞} \frac{1}{i} ∑_{j=1}^{i}(ln(X(t_{j}) − E(ln X)) = 0

holds almost certainly, i.e. that it holds with probability one. q) Let (b_{1}, …, b_{n}) be another portfolio, and let Y = b_{1}X_{1} + ⋯ + b_{n}X_{n}.

Furthermore, let W′_{i} be the value of the portfolio (b_{1}, …, b_{n}) after i time periods. Show that W_{i} > W′_{i} holds almost certainly for large numbers i if and only if we have E(ln X) > E(ln Y). Hint: Assume that the limit lim_{i→∞} \frac{1}{i} ∑_{j=1}^{i} ln(X(t_{j})) exists. The MEL-rule (“maximum expected logarithm”) says that a portfolio

(a_{1}, …, a_{n}) is better than a portfolio (b_{1}, …, b_{n}) in the very long run if E(ln X) > E(ln Y) for X = a_{1}X_{1} + ⋯ + a_{n}X_{n} and Y = b_{1}X_{1} + ⋯ + b_{n}X_{n}. Thus we should choose that point on the efficient frontier for which E(ln X) attains its maximal value.

Above we computed segments of parabolas which constitute the efficient frontier. Since we can calculate E(ln X) for the portfolios corresponding to the points of intersection of those parabolas, it suffices to consider the case that the MEL-rule specifies a portfolio which corresponds to an interior point of one of those segments of parabolas.

r) Using the Taylor expansion of ln(x) at the point x = e, prove the approximation formula E(ln X) ≈ ln(E(X)) − \frac{1}{2} \frac{Var(X)}{E(X)^{2}} .

s) Write v = q(e) and form the derivative with respect to e of the above approximation formula. Conclude that the MEL-rule yields the following additional quadratic equation for the optimal portfolio on the efficient frontier.

(5)  e^{2} − \frac{1}{2} e q′(e) + q(e) = 0

t) Develop an algorithm for computing the portfolio which is specified by the MEL-rule. Implement this algorithm in a CoCoA function MELPF(…) and apply this function to the five investments of part b). Hint: To compute ln(e), you can write e = 1 + r and use the formula ln(1 + r) = r − \frac{1}{2}r^{2} + \frac{1}{3}r^{3} − + · · ·.

How does this theory hold up in practice?

Men, it has been well said, think in herds; it will be seen that they go mad in herds, while they only recover their senses slowly,

and one by one. (Charles MacKay)

Nowadays, modern portfolio theory is widely believed and followed by professional money managers. As we have seen, it is possible to write programs which compute a suggested asset allocation in an automatic way. The economic justification for it is based on the assumption that financial markets are efficient. This means that if there was a theory which could produce reliable above-average gains in the financial world without taking above-average risks, everybody would immediately start to apply it, and it would necessarily stop functioning.

However, it has long been known that markets are not very efficient. As the world-wide stock market mania of the late 1990s showed once again, both private and institutional investors are influenced by crowd psychology. Moreover, many corporations and even governments do not hesitate to manipulate the stock and bond markets. And when a serious financial crisis develops, the market liquidity required by modern portfolio theory dries up completely, because there is no one willing or able to step in on the buy-side.

Another serious objection to modern portfolio theory is that the standard deviation or the variance of the total return of a portfolio is inadequate to measure the risk associated with this portfolio. Price volatility does not detect whether stocks or other investments are significantly over- or undervalued with respect to the assets they represent. If you invested money in the late 1920s or the late 1960s according to this theory, you would have had to put a significant portion into the US stock market, because it had a high expected return and a low volatility, and you would have lost it.

What should we do instead? Since CoCoA cannot really help us in this case, it may be useful to apply our common sense. When you invest money and buy something, it is important to pay a low price relative to the value of whatever you purchase. When your government dramatically increases the supply of money, it may be useful to convert some of your paper wealth to something of more lasting value such as real estate or gold. And when the people around you get carried away by their herd instincts, relax, recover your senses, get out of the markets while the going is good, and enjoy your life! We hope that in this way you will find the time to do some more of the tutorials in this book.

A. How to Get Started with CoCoA

No keyboard present. Hit F1 to continue. (DOS Error Message)

A.1 Getting CoCoA

The computer algebra system CoCoA is available free of charge via the internet. You may download it from the WWW page

           ftp://cocoa.dima.unige.it/cocoa/index.html

Choose the file corresponding to your machine and operating system, and do not forget to get a copy of the manual from the directory /doc. Then decompress the file ending in .zip, or .tgz, or .hqx. Depending on your system, you will have to use a command like unzip or tar -zxvf, or the graphical interface of a decompression tool like Winzip.

As a result you should have an appropriately named directory or folder, for instance /usr/local/cocoa/, which contains the executable file of the program (called cocoa or cocoa.exe), a file named userinit.coc, and a subdirectory called lib. If, instead, you find hundreds of files in your folder, you forgot to uncompress in such a way that all paths are restored!

A.2 Starting CoCoA

Now let us try the program. You can start it by simply typing

    cocoa

while you are in the folder containing the executable file. Or, if you have a graphical operating system, you can also click on its icon. And if there is no icon, create a link or shortcut to the executable file first. Then the current version of CoCoA starts up and displays a screen like

   -------------------------------------------------------
   ---           ___/       ___/         \             ---
   --           /     _\  /     _\    , \             --
   --           \    |   | \    |   |  ___\            --
   ---          ____, __/  ____, __/ _/    _\          ---
   -------------------------------------------------------
   --     Version      : 4.0                            --
   --     Online Help  : type  Man();                   --
   --     Web site     : http://cocoa.dima.unige.it     --
   -------------------------------------------------------
   -- The current ring is R ::= Q[x,y,z];
   -------------------------------

Below we shall explain how you can enter commands by going with you through a sample session. But first, let us show you how you can exit the program. Simply type

   Quit;

hit <Enter>, and that’s it! Or maybe not. If you are using the graphical interface of CoCoA under Unix or Windows, you can either send a line to CoCoA by typing <Ctrl + Enter> at the end of the line, or you can select a line or a group of lines and send it to CoCoA using <Ctrl + Enter>. And if you are using CoCoA on Macintosh, you should make sure you hit the <Enter> key, not the one marked <Return>. And if, by any chance, you are in a mediterranean mood, you can also leave CoCoA with a cordial

   Ciao;

A.3 Using CoCoA Interactively

In fact, when you typed Quit; above, you entered your first CoCoA command. A CoCoA command has two notable features: it starts with a capital letter, and it ends with a semicolon. If you want to define a new object, you have to give it a name starting with a capital letter. Then you can assign it a value by using := as in the following example.

   F:=x^2+y^2-1;

This command defines a new polynomial F in the current ring which has the value x^{2}+y^{2}−1. (We will be talking about rings later, but for the moment we assume that you just started CoCoA and that the current ring is the default ring R = Q[x,y,z].) The value of the new polynomial F is x^2+y^2-1. As you can see, the indeterminates of a polynomial ring in CoCoA have lower-case letters as names and are raised to powers using the ^key. Sometimes they carry indices like x[1],x[2],x[3]. All other names of objects and functions in CoCoA start with a capital letter.

Now let us print out the value of our polynomial F. For this we could type

Print(F); or simply
   F;

Then CoCoA answers

   x^2 + y^2 - 1
   -------------------------------

We could also perform some calculation before typing its result, e.g.

   F^2-F+1;

yields the output

   x^4 + 2x^2y^2 + y^4 - 3x^2 - 3y^2 + 3
   -------------------------------

Next we apply one of the built-in CoCoA functions.

   Factor(F-2xy+1);

CoCoA replies

   [[x - y, 2]]
   -------------------------------

which means F − 2xy + 1 = (x − y)^{2} .

A.4 Getting Help

A moment ago we saw an example of the use of the CoCoA function Factor(). If you want to know more about this function, type

   Man('Factor');

and CoCoA will display the page of its on-line manual describing the function Factor(). In this case, you may even type

   Man('fac');

Since fac is not the name of a CoCoA command, CoCoA looks for all topics in its on-line manual containing that string. For more extensive information about how to use the manual, type

   Man();

After that, you get a list of possible commands for getting help. For instance, H.Toc(); will give you the table of contents of the online manual, H.Tips(); will give you tips for using the online manual, and H.Commands('Topic'); summarizes all commands associated with 'Topic' (the quotes are needed to mark a string).

There are several other ways to access the CoCoA manual. In the directory doc on the ftp-server mentioned in Section A.1 you will find an html-version for reading with an internet browser, and a postscript-version for printing. Finally, if you use the graphical interface of CoCoA under Windows, you can also access the manual through the Windows help system.

Since this introduction to CoCoA has to be limited in space and scope, we strongly urge you to look up all the topics we discuss in the manual. There you will find more extensive and more detailed information. Moreover, there is a section of the manual called “Tutorial” which complements these appendices and should be studied as well.

A.5 Data Types

Let us get back to our example session. Suppose we now want to define a polynomial ideal. Using the manual, we find that the correct command is Ideal() and we can type

   I:=Ideal(F,x-y);
   J:=Ideal(x,y,z)^2;
   Intersection(I,J);

CoCoA will not reply to the first two lines, since they are assignments. But it reacts to the last line by printing

   Ideal(xz - yz, xy - y^2, y^2z^2 - 1/2z^2, y^3z - 1/2yz,
   y^4 - 1/2y^2, x^2 - y^2)
   -------------------------------

which means that the intersection of the ideals I and J has been computed. Sometimes it may be advisable to use the command Set Indentation; before typing out a list or an ideal. In our case, we’d get

   Ideal(
     xz - yz,
     xy - y^2,
     y^2z^2 - 1/2z^2,
     y^3z - 1/2yz,
     y^4 - 1/2y^2,
     x^2 - y^2)
   -------------------------------

Naturally, this behaviour can be reversed by entering Unset Indentation;

Many CoCoA objects like polynomials, ideals, and modules are defined over a base ring. The command CurrentRing(); tells you the value of the current ring. E.g. in our example session we would get the answer Q[x,y,z]. A new ring can be defined by a command like

   Use S::=Z/(5)[x,y,z];

Here ::= is the instruction to create a new ring, S is its name, Z/(5) is its field of coefficients, and x,y,z are its indeterminates. After you have defined the new ring S, you are also making it the current base ring by invoking the command Use <Ringname>; You can switch back to your initial ring with the command Use R; and if you type RingEnvs(); you get a list of all the base rings defined so far.

Whenever you create a new polynomial, ideal, or module, it is defined over the current ring. To see a list of all objects in the working memory, you can type Memory(); and to see also the values of those objects you can use Describe Memory(); At this point you may get a list of descriptions of objects of different types. Some of the most common data types in CoCoA are

INT, RAT arbitrarily large integers resp. rational numbers ZMOD elements of a finite field ℤ/(p) where p is a prime number POLY polynomials IDEAL polynomial ideals RING polynomial rings VECTOR vectors whose entries are polynomials MODULE submodules of finite free modules over polynomial rings

LIST  Lists of objects of the form [Object1, Object2, Object3]

MAT matrices of polynomials STRING strings (sequences of characters) BOOL Boolean variables (i.e. their value is either TRUE or FALSE)

In CoCoA, you usually do not have to specify the data types of the objects you create. Most sensible data type conversions are done automatically. The command Type(Object) displays the data type of an Object. If necessary, you can also force type conversions using Cast() e.g.

   L:=[x,y,z];
   Type(L);

shows that L is of type LIST, whereas

   Cast(L,IDEAL);

leads to the answer

   Ideal(x, y, z)
   -------------------------------

For special type conversions, there are frequently individual commands, e.g. the above conversion could have been done by typing I:=Ideal(L); Then the ideal I can be converted back to a list by using Gens(I); which brings us to our next topic: What is a list?

A.6 Lists

In CoCoA, a list is a sequence of objects, separated by commas and enclosed in square brackets. Lists are very common and useful objects in CoCoA. Examples of lists are for instance [1,2,3] and [x,y,z]. The different components of a list do not necessarily have to have the same data type, e.g. as in the list [1,TRUE,x]. Given a list L:=[x,y,z]; you can access its second component by typing

   L[2];

which yields the result y. Another way to achieve the same result is to type Comp(L,2); This is especially convenient if the list L is not directly given by its name but the result of some other evaluation, e.g. as in Comp(Gens(I),1); where I is an ideal.

Besides listing all the elements, there are other ways to create a list. Two simple ones are the range operator and the Cartesian product. The range operator N..M creates the list of all integers between N and M. For instance,

   1..5;

creates the list

   [1, 2, 3, 4, 5]
   -------------------------------

The range operator can also create a list of indeterminates of the current ring (in the current term ordering), e.g. if the current ring is Q[x,y,z], then x..z creates the list [x,y,z], and if the current ring is Q[x[1..8]], then x[1]..x[4] creates the list [x[1],x[2],x[3],x[4]]. The Cartesian product of two lists is the list of all pairs, e.g. the product [1,2,3] >< [x,y] yields

the list [[1, x], [1, y], [2, x], [2, y], [3, x], [3, y]].

There are many built-in CoCoA function for dealing with lists. We invite you to print a list of them using Man('Functions for Lists'); In our opinion, some of the most useful ones are

a) Append(L,O) to append an object O to a list L,

b) Concat(L,M) to combine two lists L and M into one,

c) First(L,N) and Last(L,N) to retrieve the list of the first and last N elements of a list L, respectively,

d) Diff(L,M) to create the list of all elements of the list L which are not in the list M, and

e) Len(L) to determine the number of elements of a list L.

If you want to build a new list by computing (or entering) its elements one by one, you can either apply commands such as Append(L,x); repeatedly, or you can first define a new “empty” list of a specified length N via L:=NewList(N); and then assign its entries using commands such as

L[1]:=x;

Notice that, unlike other functions for lists, the command Append(L,x) does not return a value, but modifies the argument list L. CoCoA tries to be clever about operations with lists. For instance, if L:=[x,y,z]; then 2L; yields the list [2x, 2y, 2z]. But of course, it has to leave some thinking to you, and a construction like [x,y,z]^3; makes no unique sense.

Finally, we note that more advanced ways to construct lists will be discussed in Appendix B.5.

A.7 It

Finally, we would like to mention a special CoCoA variable called It. At each point in time it contains the last output. In particular, if you print the result of a computation and then discover that you still need it, you can assign it to a variable using It, e.g.

   Factor(x^9-1);
   [[x - 1, 1], [x^2 + x + 1, 1], [x^6 + x^3 + 1, 1]]
   -------------------------------
   L:=It;
   L;
   [[x - 1, 1], [x^2 + x + 1, 1], [x^6 + x^3 + 1, 1]]
   -------------------------------

Of course, we encourage you to develop a habit of always assigning the result of a computation to a variable, e.g. using L:=Factor(x^9-1); and then to print it. As one CoCoA programmer put it:

Never use It!

B. How to Program CoCoA

The code was willing. It considered your request, but the chips were weak.

(Anonymous)

B.1 Defining New CoCoA Functions

Apart from using CoCoA interactively as explained in Appendix A, the system also gives you the possibility to extend it by writing your own CoCoA functions. It has a fully-fledged programming language, called CoCoAL, and provides means for packaging, storing and reusing the functions you create.

A new CoCoA function is created using a command of the form

   Define FunctionName(Arguments)
      <Commands>
   EndDefine;

Here FunctionName is the name by which you later want to call your function, Arguments is the (possibly empty) list of arguments it takes, and <Commands> denotes a group of CoCoA commands.

Let us look at an example. We want to write a function which computes the ideal generated by the p^{th} powers of the generators a given ideal, where the prime number p is the characteristic of the base field.

   Define Frobenius(I)
      P:=Characteristic();
      L:=Gens(I);
      For N:=1 To Len(L) Do
         L[N]:=L[N]^P;
      EndFor;
      Return Ideal(L);
   EndDefine;

Note that in order to enter this function definition on a version of CoCoA having a graphical interface, you should highlight all lines using the mouse and then evaluate this selection. Afterwards we can use our new function like any built-in CoCoA function. For instance, we can type

   Use S::=Z/(5)[x,y,z];
   I:=Ideal(xy,yz,x-y);
   Frobenius(I);

and we get the answer

   Ideal(x^5y^5, y^5z^5, x^5-y^5)
   -------------------------------

After the execution of this function, your original ideal I is unchanged, although it has been tampered with inside the function! The reason for this is that the ideal I inside the function Frobenius(I) is just a “local” object to which CoCoA passed the value of your original ideal I. Instead, if you want the function to operate directly on the original ideal, you should type Define Frobenius(Var I) in the first line of the function definition.

B.2 Program Development

As soon as you start to write CoCoA functions more frequently, you will feel the need to develop some techniques for doing this. Since the available methods vary considerably from one operating system to another, and since almost every CoCoA programmer has his own favourite procedures, we shall restrict ourselves to pointing out the most common ways.

Many CoCoA users work with a text-based CoCoA interface inside a graphical operating system environment, e.g. inside X-Windows or Windows. In this case we recommend the “Copy and Paste” technique for creating CoCoA functions:

• Open two windows, one for CoCoA and one for a text editor. The editor should be able to save pure ASCII files.

• Create the CoCoA function inside the editor.

• Use “Copy” and “Paste” to transfer the definition to CoCoA, so that CoCoA can check it for syntax errors.

• Repeat the previous steps until the program is correct. Then you can save it using the editor in a file whose file name extension is customarily taken to be .coc.

Another possibility for Unix users is to run CoCoA in a shell of a suitable editor program like Emacs. (Some useful files for doing this are on the CoCoA website.) If you run a text-based version of CoCoA under a text-based operating system like DOS, you will have to revert to a more primitive technique:

• Create the function using a text editor and save it in a file, e.g. in

myfile.coc.

• Modify the file userinit.coc to include a source command which reads your file at startup, i.e. include the line

   << 'myfile.coc';

• Now start CoCoA. It reads and checks your program. If there is still an error, you have to quit CoCoA and return to the editor.

A much more advanced way of using CoCoA is possible if you are able to use one of the CoCoA versions with a graphical user interface, e.g. the new graphical interface for X-Windows and Windows, or CoCoA on a Macintosh. In this case you can edit your function inside the lower window, select it and send it to CoCoA until it is correct. Probably you may not want to do this in the interactive window, but rather in a file window which you can create using <File> + <New>. When you are content with your function, you can then save it to a file. And don’t forget to write some documentation for your functions, or else you will soon be unable to reuse them!

B.3 Input and Output

In Section B.1 we saw an example of how a CoCoA function can pass the result of its computations back to the system. The command

   Return <Object>;

exits the function and returns the value of <Object> to the place from where the function was called.

Passing objects to a CoCoA function is obviously achieved through its argument or list of arguments. Notice that the name which you give to a function argument in the function definition does not have to agree with the name of the object on which you call the function. Moreover, the argument name in the function definition denotes a variable for which you do not have to specify a data type and which is local to the function, i.e. it may agree with the name of an object elsewhere and it will be deleted after the function has been executed. Finally, it is important to remember that objects outside the CoCoA function which are not passed to it through the list of arguments are not known inside the function. For instance, if we have

   I:=Ideal(x^2,y^2);
   Define IdealSquare(J)
      I:=J^2;
      Return I;
   EndDefine;

then the ideal I:=Ideal(x^2,y^2); is not destroyed or changed during the

execution of IdealSquare(Ideal(z)); and we can call IdealSquare(I);

without getting into trouble.

Another way of obtaining feedback from a CoCoA function, for instance during its execution, is to have it write output on the screen. This can be achieved by using the commands

   Print <Object>,...,<Object>;
   PrintLn <Object>,...,<Object>;

The first command is used to print a sequence of objects to the screen, and the second one does the same thing but adds a line break afterwards. For example, to print out the value of F:=x^2+y^2-1, we could write

   Print 'The value of F is F = ',F;
   The value of F is F = x^2 + y^2 - 1
   -------------------------------

Finally, using CoCoA you can also write data to files and read them again. We have already mentioned the source command << which allows you to read a file containing function definitions, e.g. << 'myfile.coc'; For reading and writing other data, you need to open an input or an output file and to write to such a “device”. Since this is a very advanced use of CoCoA, we refer you to Man('Print On'); for details about printing on a file.

B.4 Program Flow Control

Our next topic is to discuss methods for controlling the way in which a sequence of commands is executed within a CoCoA function. In order to repeat a certain sequence of commands a prescribed number of times, you can use a construction like

   N:=10;
   For I:=1 To N Do
      <Commands>
   EndFor;

Here I is the name of an integer variable which is initially one, is increased by one each time the <Commands> have been executed, and is N (or an expression having an integer value) when the loop ends. For instance, the following function creates a random vector over the base field whose length is the number of indeterminates of the base ring.

   Define RandomVector()
      N:=NumIndets();
      L:=NewList(N);
      For I:=1 To N Do

   L[I]:=Rand();
EndFor;
Return Vector(L);
EndDefine;

Another way to create a loop is provided by the command

ForEach M In L Do
<Commands>
EndForEach;

where M is an object name which you can choose and L is a list. Here the <Commands> are executed for each element of the list (whose elements are examined in the obvious order), and during that execution the element is the value of the “read-only” object M. This loop construction is particularly useful if you do not know beforehand how many elements L is going to have, i.e. how often the <Commands> have to be performed. For example, the function

Define TermProduct(D)
L:=Support(DensePoly(D));
Result:=1;
ForEach M In L Do
   Result:=Result*M;
EndForEach;
Return Result;
EndDefine;

computes the product of all terms of degree D in the current ring. Even more common is the situation that a loop has to be repeated until a certain logical condition is satisfied. This can be achieved by using

While <logical condition> Do
<Commands>
EndWhile;

Here the <logical condition> is some expression which evaluates to a Boolean value. If this Boolean value is TRUE, then the <Commands> are executed, otherwise the loop ends. For instance, the following example computes the largest power of two dividing a given natural number.

Define MaxPower(N)
I:=1;
While Mod(N,2)=0 Do
   I:=I*2;
   N:=N/2;
EndWhile;
Return I;
EndDefine;

Finally, CoCoA also provides methods for executing one sequence of commands or another, depending on the value of some logical condition. The two most frequently used methods are

   If <logical condition> Then <Commands> EndIf;
   If <logical condition> Then <Cmds1> Else <Cmds2> EndIf;

In the first case, the <Commands> are executed only if <logical condition> evaluates to TRUE. Otherwise they are skipped and program execution continues after the EndIf; In the second case, the commands <Cmds1> are executed

if the <logical condition> is TRUE, and the commands <Cmds2> are exe-

cuted if it is FALSE. For instance, the function

   Define MaxOdd(N)
      If Mod(N,2)=1 Then
         Return N;
      Else
         M:=MaxPower(N)
      EndIf;
      Return N/M;
   EndDefine;

computes the largest odd divisor of a natural number N. Notice that the command Return N; leads to an immediate termination of this function if it is encountered.

Should these hints be not sufficient to solve your specific program flow control problem, or should you intend to get the “CoCoA bug”, we invite you to study the CoCoA manual which contains several more possibilities and a host of examples.

B.5 List Constructions

The creators of CoCoA spent a lot of effort to make the system as user-friendly as possible. In particular, CoCoA allows you define lists of objects in ways which are very similar to the usual mathematical definition of sets in books or on the blackboard. This list construction can take a number of different forms, the most important of which are

   [ <Object> | X In <List> ]
   [ <Object> | X In <LIST> And <logical condition> ]
   [X In <List> | <logical condition>]

In the first form, <Object> is a CoCoA expression which usually depends on the variable X and evaluates to a CoCoA object. Thus this form constructs the list of all such objects such that X is an element of the <List>. The second form does essentially the same thing, except that only those elements X of <List> are used to construct objects for which the <logical condition> evaluates to TRUE. The third form creates the sublist of <List> consisting of all of its elements X for which the <logical condition> is TRUE.

Let us see some examples of list constructions. The first function returns a list of N random linear forms in the current ring, where N is a specified natural number.

   Define RandomLinear(N)
      L:=[Randomized(DensePoly(1)) | I In 1..N];
      Return L;
   EndDefine;

Notice that in this case I is not used in the definition of the created list elements, and observe the use of the range operator 1..N which generates the list [1,2,3,...,N]. An example for the second form of list constructions is

   Define EvenIntegers(N)
      L:=[I | I In 1..N And Mod(I,2)=0];
      Return L;
   EndDefine;

a function which returns the list of even integers between 1 and N. Finally, the function

   Define IrrePolys(L)
      Irre:=[F In L | Len(Factor(F))=1];
      Irre:=[F In Irre | Comp(Factor(F),1,2)=1];
      Return Irre
   EndDefine;

computes the sublist of a given list of monic polynomials consisting of the irreducible ones.

Maybe you have also noticed that in this example program we have a command which does not end in a semicolon, apparently contradicting what we said in Appendix A. Without falling into the abyss of computer jargon, let us just say that you can drop the semicolon if it immediately precedes

                            the End;

of some command.

B.6 Recursive Programming

Next we show you the perfect way for creating CoCoA programs which run into an infinite loop. More seriously, CoCoA allows a function to call itself. Of course, if you use this feature you have to make sure that the process terminates eventually. For example, a compact implementation of the computation of the factorial of a natural number is

   Define Factorial(N)
      If N=0 Then
         Return 1;
      Else
         Return N*Factorial(N-1);
      EndIf;
   EndDefine;

In this example finiteness is achieved by checking whether N=0 before the recursive function call which applies to a smaller integer N-1. Clearly, recursive function calls are both powerful and dangerous. Let us give one more example. The following function recursively computes the nondecreasing list of prime factors of a natural number.

   Define FactorList(N)
      If N=1 Then
         Return [];
      EndIf;
      I:=2;
      While Mod(N,I)<>0 Do
         I:=I+1;
      EndWhile;
      L:=FactorList(N/I);
      Return Concat([I],L);
   EndDefine;

And now off to your own experiments!

B.7 Improving Your Programs

To end our whirlwind tour of CoCoA, let us show you some ways to improve and manage your CoCoA programs. The command

   Set Timer;

turns on an automatic timing mechanism. Every time you enter a command, CoCoA displays the CPU time that was consumed for its execution, e.g.

   Set Timer;
   Factor(x^233-3x^223+x^222-7x^12+x^11+21x^2-10x+1);
   [[x^11 - 3x + 1, 1], [x^222 - 7x + 1, 1]]
   -------------------------------
   Cpu time = 1.81, User time = 1
   -------------------------------

You can use this feature to test various versions of your programs and optimize them for fastest performance. If you get sick of those timing messages, you can turn them off again by typing (guess what?) Unset Timer; To time a single command, you can also use Time <Command>; For instance, above we could have written

   Time L:=Factor(x^233-3x^223+x^222-7x^12+x^11+21x^2-10x+1);

After a while, you will have a number of CoCoA functions, and if you do not use them regularly, you will forget their exact names, syntax, etc. To find their names again after you loaded the file containing them, you can use the CoCoA command

   Starting( <String> );

It displays a list of the names of all CoCoA functions starting with <String>, including you own creations. Do not forget to enclose the string in quotes, though! And if you have a hard time remembering the syntax of the functions you wrote, we suggest that you write a help function for each of them. If the function is called MyFunction(), you should create a new function like

   Define Help_MyFunction()
      <Commands>
   EndDefine;

Then this function is executed every time you type Help('MyFunction'); Of course, the <Commands> it contains will usually be commands to print some help text.

After another long while, you will have so many CoCoA functions that it becomes difficult to keep track of all their names, etc. If you come this far, you can get out of trouble by collecting your functions in packages. A CoCoA package is a file containing a lot of CoCoA functions. Usually it has a name ending with .pkg. Its content is of the shape

   Package <Packagename>
      <Function Definitions>
   EndPackage;

Later you can share your package with others, e.g. people in the CoCoA User Group or other students in your class sweating over the same homework. As this is again a very advanced way of using CoCoA, we suggest that you look

at Man('Package'); for details.

In the next appendix you can see some examples in which the previous hints are applied. If you need more precise information, we suggest that you look carefully at the CoCoA manual mentioned in Appendix A. And if all else fails, you may write an e-mail to

   cocoa@dima.unige.it

But for the time being, we wish you good luck and say

   Ciao;
   -- Bye

C. A Potpourri of CoCoA Programs

Bugs come in through open Windows. (Anonymous)

C.1 Some Hints for Tutorial 1

In this appendix we shall frequently see that the same algorithm can be turned into CoCoA functions in many ways. Part a) of Tutorial 1 is a case in point. For a beginning programmer, the following solution should not be too difficult to find.

   Define ReprUniv(F,X)
      L:=NewList(Deg(F)+1);
      For I:=0 To Deg(F) Do
         L[I+1]:=CoeffOfTerm(X^I,F);
      EndFor;
      Return L;
   EndDefine;

In the second line, we define a new list L of the appropriate length. Then a For-loop is used to fill that list with the coefficients of the given polynomial. The identifier X holds the name of the indeterminate with respect to which the polynomial F is univariate. Notice how we had to change the indices, since in CoCoA the elements of a list are numbered starting with “1”.

An elegant solution is based on the CoCoA function Coefficients(…).

   Define ReprUniv(F,X)
      Return Reversed(Coefficients(F,X));
   EndDefine;

As for the function ListToPoly(…), we only give you the solution involving the list construction, in order to make you feel more comfortable with this style of programming. (We trust you can do the For-loop by now, can’t you?)

   Define ListToPoly(L)
      Return Sum([L[I] x^(I-1) | I In 1..Len(L)]);
   EndDefine;

For part c), we leave the implementation of AddUniv(…) to you. A very explicit and down-to-earth solution for the multiplication could look as follows.

Define MultUniv(L,M)
D:=Len(L)+Len(M)-2;
For I:=Len(L)+1 To D+1 Do
   Append(L,0);
EndFor;
For I:=Len(M)+1 To D+1 Do
   Append(M,0);
EndFor;
N:=NewList(D+1,0);
For I:=0 To D Do
   N[I+1]:=Sum([L[J+1]*M[I+1-J] | J In 0..I]);
EndFor;
Return N;
EndDefine;

In the second line, we determine the degree D of the product. Then we append zeros to the lists L and M until both of them have length D+1. Finally, we construct another list N which will contain the final result. Its entries are computed using the formula for the coefficients of the product given in the hint. The list construction creates the list of all a_{j}b_{i−j}.

The following CoCoA program removes the trailing zeros of a list. It may be useful for solving part d) of the tutorial. Notice how we were able to exploit the While-loop.

Define Shorten(L)
N:=Len(L);
While L[N]=0 Do
   N:=N-1;
EndWhile;
Return First(L,N);
EndDefine;

There is also an elegant solution to part d) based on Coefficients(...) and the list construction. Although we do not expect you to be able to write such programs (yet!), it is well worth studying.

Define ReprPoly(F)
Return [Reversed(Coefficients(G,x))|G In
        Reversed(Coefficients(F,y))];
EndDefine;

By now, you should begin to see the picture of how the other parts of the tutorial can be solved. For instance, for the function AddPoly(…) you should again switch the summands such that the one with the higher y -degree comes first, and then add the second one onto the first one using AddUniv(…). And by the time you are doing MultPoly(…), you will find that the hardest part of programming is usually to get your mathematics right. We end these hints with a master solution of the PolyToList conversion in the general case.

   Define PolyToList(F)
      Return RecPolyToList(F,1);
   EndDefine;
   Define RecPolyToList(F,N)
      If N=NumIndets() Then
         Return Reversed(Coefficients(F,Indet(N)));
      EndIf;
      Return [RecPolyToList(G,N+1)|G In
              Reversed(Coefficients(F,Indet(N)))];
   EndDefine;

C.2 Different Styles of CoCoA Programming

Computers are not intelligent. They only think they are.

(Anonymous)

Let us show you some different programming styles using a very elementary example. We want to create an n × n-matrix whose entries are random integers between 0 and 100. A quick look at the on-line manual, and you should be able to locate the function Rand(0, 100) which generates such a random integer.

A very explicit first way to solve our task is to create a new matrix of the desired size and then to fill it using a double For-loop.

   Define RandomMatrix(N)
      M:=NewMat(N,N);
      For I:=1 To N Do
         For J:=1 To N Do
            M[I,J]:=Rand(0,100);
         EndFor;
      EndFor;
      Return M;
   EndDefine;

Another possibility which is sometimes preferred by beginners is to create the necessary lists by starting with an empty list and using the Append(…) command, for instance

   Define RandomMatrix(N)
      M:=[];
      For I:=1 To N Do
         L:=[];
         For J:=1 To N Do
            Append(L,Rand(0,100));
         EndFor;
         Append(M,L);
      EndFor;
      Return Mat(M);
   EndDefine;

Both of these double loops tend to be rather slow in practice. Try RandomMatrix(100)! A more efficient way is to use the list constructions advertised in Appendix B.6. In our example, we could write

   Define RandomMatrix(N)
      M:=[[Rand(0,100) | I In 1..N] | J In 1..N];
      Return Mat(M);
   EndDefine;

This would produce the same result. Even more compressed code can be generated using the short form for defining one-line functions.

   RandomMatrix(N):=Mat[[Rand(0,100)|I In 1..N]|J In 1..N];

But don’t overdo it! We would consider this bad programming style. If you squeeze too much into those list constructions, your program code becomes difficult to read. And the one who has to suffer most because of this is usually yourself, when you want to reuse your code (or parts of it) at a later stage.

C.3. Hints for Other Tutorials in Chapter 1

When all else fails, read the instructions.

(Anonymous)

In order to make the tutorials accessible to inexperienced CoCoA programmers, we now provide some additional hints for selected tutorials in Chapter 1. We strongly urge you to first try those tutorials on your own. If all else fails, you may look for some inspiration here. But keep in mind that CoCoA programming is only 10% inspiration and 90% perspiration.

In Tutorial 2 you should not have severe problems to convert the given steps into workable CoCoA programs. But for PolyExtEuclid(…), let us show you how to implement the crucial step 4). We suppose that the tuple (c_{0}, d_{0}, e_{0}) is stored in T0 and (c_{1}, d_{1}, e_{1}) in T1.

While T1[3] <> 0 Do
Q:=DivAlg(T0[3],[T1[3]]);
Q1:=Comp(Q.Quotients,1);
T:=T0-Q1*T1; T0:=T1; T1:=T;
EndWhile;

The following program computes all monic univariate polynomials of a specified degree over a finite field.

Define MonicPoly(D)
If D=0 Then
   Return [1];
EndIf;
If D=1 Then
   Return [x+N | N In 0..(Characteristic()-1)];
EndIf;
Pre:=MonicPoly(D-1);
Return ConcatLists([[x*F+N | N In
   0..(Characteristic()-1)] | F In Pre]);
EndDefine;

You can use it in Tutorial 3 for writing the function IrredPoly(…). Loop through all monic polynomials of some degree and check whether they are divisible by any irreducible polynomial of smaller degree. The remainder of the division of F by G can be found by calling NR(F,[G]).

Clearly, the function GaussFactor(…) in Tutorial 4 is a tough nut to crack. So, let us help you. Suppose a Gaußian number z = a + ib ∈ ℤ[i] is represented in CoCoA by the list [a, b]. Using the function Sqrt(…) from Appendix C.5, we can create a list of possible divisors of z = a+ib as follows.

Define PossibleDivisors(Z)
Norm:=Z[1]^2+Z[2]^2;
N:=Sqrt(Norm,0);
L:=Diff((-N..N) >< (-N..N), [[0,0]]);
Return [X In L | Mod(Norm,X[1]^2+X[2]^2)=0];
EndDefine;

While nothing special needs to be said about Tutorial 5, the following function does part of the work in Tutorial 6. In fact, it provides a quick way to compute the matrix Q.

Define MatQ(F)
P:=Characteristic();
Q:=NewMat(Deg(F),Deg(F),0%P);
Q[1,1]:=1%P;
XP:=NR(x^P,[F]);
XI:=1;

   For I:=1 To Deg(F)-1 Do
      XI:=NR(XI*XP,[F]);
      Q[I+1]:=[CoeffOfTerm(x^J,XI) | J In 0..(Deg(F)-1)];
   EndFor;
   Return Q;
EndDefine;

Notice that the expression 1%P gives you the residue class of 1 in the field Z/(P), independent of what the current ring is.

Tutorials 7 and 8 are again easy, but since there are so many small functions you have to write in Tutorial 8, let us do two of them for you. (The very desperate among you can even use those programs to reverse-engineer a hint for the proof!)

Define MonIntersection(I,J)
   L:=[LCM(G[1],G[2]) | G In Gens(I) >< Gens(J)];
   Return Ideal(Interreduced(L));
EndDefine;
Define MonColon(I,J)
   K:=Ideal(1);
   ForEach G In Gens(J) Do
      L:=[LCM(F,G)/G | F In Gens(I)];
      K:=MonIntersection(K,Ideal(L));
   EndForEach;
   Return K;
EndDefine;

For Tutorials 9 and 10, it is important that you know about CoCoA’s sorting facilities. For instance, suppose we have a list of pairs of integers, and we want to sort them into lexicographically increasing order. The first step consists of defining a Boolean-valued function of two arguments which returns TRUE if the first argument is smaller than the second one.

Define MyLex(A,B)
  Return A[1]<B[1] Or (A[1]=B[1] And A[2]<=B[2]);
EndDefine;

Now we can sort any list L of pairs of integers with respect to our comparison function MyLex(A,B) by typing

NewL:=SortedBy(L,Function('MyLex'));

In view of the extensive help we offered for Tutorial 1, we hope that you can manage to do Tutorial 11 essentially on your own. In order to check the correctness of your results, you can also use the inverse transformation

Define ListToPoly(L)
   Return Sum([X[1]*LogToTerm(X[2]) | X In L]);
EndDefine;

If you somehow got stuck writing the function ElSym(…) in Tutorial 12, but you would like to try your luck with the last parts of the tutorial, you can use the following alternative solution. It is based on the formula

(y − x_{1})(y − x_{2}) ⋯ (y − x_{n}) = ∑_{i=0}^{n}(−1)^{n−i}s_{n−i} y^{i}

Furthermore, you can learn from this function how to use a different base ring inside a CoCoA function and how to move polynomials from one ring to another.

Define AltElSym(N,I)
P:=Characteristic();
If P=0 Then
   NewR::=Q[x[1..N],y];
Else
   NewR::=Z/(P)[x[1..N],y];
EndIf;
Using NewR Do
   F:=Product([y-x[I] | I In 1..N]);
   S:=Coefficients(F,y);
   SI:=(-1)^I * S[I+1];
EndUsing;
Phi:=RMap(Concat(First(Indets(),N),[0]));
Return Image(SI,Phi);
EndDefine;

In Tutorial 13 there is nothing to program, and in Tutorials 14 and 15 the stated algorithms should easily convert into CoCoA programs on a stepby-step basis. Nevertheless, let us offer you the following subprograms which may aid you in implementing step 2) of the Division Algorithm 1.6.4.

Define Reducer(M,G)
For I:=1 To Len(G) Do
   If LPos(G[I])=LPos(M) And Type(LPP(M)/LPP(G[I]))=POLY
   Then
      Return I;
   EndIf;
EndFor;
Return 0;
EndDefine;
Define DivisionLT(M,G)
Q:=NewList(Len(G),0);
I:=Reducer(M,G);
While I<>0 Do
   Q[I]:=Q[I]+LPP(M)/LPP(G[I]);

         M:=M-LPP(M)/LPP(G[I])*G[I];
         I:=Reducer(M,G);
      EndWhile;
      Return [Q,M];
   EndDefine;

Finally, in Tutorial 16 no programming is required. What a pity, we were just getting the knack of it!

C.4 Optimizing CoCoA Functions

How do you make Windows faster?

Throw it harder. (Anonymous)

When you start to write more complicated CoCoA programs, you will soon discover cases where the execution of the program seems to be unduly slow. There is a simple rule-of-thumb which says that most computer programs spend more than 90% of the execution time in less then 10% of the program code. Hence, if you want to improve the performance of your CoCoA programs, you have to find the lines corresponding to those 10% of the code, and to optimize them carefully.

Let us explain this process using a very easy example. In Appendix B.6 we showed you the program FactorList(N) which uses recursive programming and computes the list of prime numbers dividing a given integer N. First we measure the time it needs to factorize a few numbers.

   Time FactorList(123456789);
   [3, 3, 3607, 3803]
   Cpu time = 7.31, User time = 7
   -------------------------------
   Time FactorList(1111111);
   [239, 4649]
   Cpu time = 4.51, User time = 5
   -------------------------------

These answers mean that, on a modest computer, it took 7.3 and 4.5 seconds to factor the two numbers. If we look at the source code of our program, it is clear that the most time consuming part is the While-loop. If we didn’t know that, we could put a Time command in front of every suspicious line of the program. For the moment, let us just put a Time command in front of the While-loop. (We also added a PrintLn; command before Return []; in order to improve the appearance of the output.)

FactorList(123456789);
Cpu time = 0.00, User time = 0
Cpu time = 0.00, User time = 0
Cpu time = 3.35, User time = 3
Cpu time = 3.57, User time = 4
[3, 3, 3607, 3803]
-------------------------------
FactorList(1111111);
Cpu time = 0.22, User time = 0
Cpu time = 4.34, User time = 4
[239, 4649]
-------------------------------

The data confirm that almost all of the time is spent searching for the large prime divisors. For this task, several obvious improvements are at hand. For instance, we can start the search for a new divisor with the last one, and after we have reduced N to an odd number we can look for odd divisors only. The following function incorporates these optimizations.

Define FactorList2(N)
   If N=1 Then
      Return [];
   EndIf;
   If Mod(N,2)=0 Then
      Return Concat([2],FactorList2(N/2));
   EndIf;
   L:=[];
   I:=1;
   While I<=N Do
      I:=I+2;
      If Mod(N,I)=0 Then
         Append(L,I);
         N:=Div(N,I);
         I:=I-2;
      EndIf;
   EndWhile;
   Return L;
EndDefine;

The result is a noticeable speeding up of our factorizations.

Time FactorList2(123456789);
[3, 3, 3607, 3803]
Cpu time = 2.14, User time = 2
-------------------------------

Time FactorList2(1111111);
[239, 4649]
Cpu time = 2.59, User time = 2
-------------------------------

But more difficult examples still take too long.

Time FactorList2(111111111);
[3, 3, 37, 333667]
Cpu time = 184.50, User time = 185
-------------------------------

Sometimes alternative ways of implementing the same function can influence the execution time. For instance, in Appendix C.2 the versions of the program RandomMatrix(N) which are based on list constructions are significantly faster than the ones based on For-loops. But usually we can achieve the best program improvements by working on the underlying mathematics. Our third and final version of FactorList(N) is a case in point. It applies the function Sqrt(XRat,N) introduced in the next section to restrict the search for prime divisors of N to numbers less than or equal to the square root of N.

Define FactorList3(N)
   If N=1 Then
      Return [];
   EndIf;
   If Mod(N,2)=0 Then
      Return Concat([2],FactorList3(N/2));
   EndIf;
   L:=[];
   S:=Sqrt(N,0);
   I:=3;
   Repeat
      If Mod(N,I)=0 Then
         Append(L,I);
         N:=Div(N,I);
         S:=Sqrt(N,0);
         I:=I-2;
      EndIf;
      I:=I+2;
   Until I>S;
   Append(L,N);
   Return L;
EndDefine;

This time the factorization of the more difficult example above is found in a split second!

   Time FactorList3(111111111);
   [3, 3, 37, 333667]
   Cpu time = 0.17, User time = 0
   -------------------------------

C.5 How To Do Calculus Using CoCoA

Ask not what your country can do for you. Ask what you can do for your country.

(John F. Kennedy)

Most computer algebra systems have been designed and developed by people who had certain applications or functionalities in mind. Thus each of them has its strengths and its weaknesses. As a user, you will sooner or later discover that your favourite computer algebra system was not designed to do precisely what you want it to do. Should you then switch to another one? Maybe. But frequently it is just as useful and instructive to teach your old dog a new trick.

For instance, CoCoA was clearly not designed for applications in calculus. In the current version, there are no floating point numbers available, and not a single transcendental function (sin, log, exp,...) is implemented. Nevertheless, in several situations above we needed an approximation for the square root of a rational number. Let us show you how you can extend the scope of CoCoA to include such a function. First we need the possibility to round a rational number to a given number of digits after the decimal point. (Our function always rounds the number downwards. We leave it to you to find the appropriate change in order to get the usual rule.)

   Define Round(XRat,N)
      XR:=Cast(XRat*10^N,RAT);
      Return Div(XR.Num,XR.Den)/10^N;
   EndDefine;

Next, we scour some calculus books and come up with an algorithm for computing square roots. It is based on the method used by the ancient Babylonians. Namely, given a real number r > 0, the sequence x_{0} = r and x_{i} = \frac{1}{2} (x_{i−1} + \frac{r}{x_{i−1}} ) for i ≥ 1 converges to \sqrt{r}.

   Define Babylon(XRat,N)
      Last:=XRat;
      New:=(XRat+1)/2;
      While Abs(New-Last)>(0.1)^(N+1) Do
         Last:=New;
         New:=(Last+XRat/Last)/2;
      EndWhile;
      Return Round(New,N);
   EndDefine;

Unfortunately, this method converges too slowly if we start with a large number. Hence our final function first reduces the problem to a number r/10^{i} < 1 and then applies the Babylonian algorithm.

   Define Sqrt(XRat,N)
      I:=0;
      While 10^I<Abs(XRat) Do
         I:=I+1;
      EndWhile;
      If Mod(I,2)=1 Then
         I:=I+1;
      EndIf;
      Return Babylon(XRat/10^I,N+I/2)*10^(I/2);
   EndDefine;

It is clear that endless further possibilities exist for extending the functionality of CoCoA. So, do not ask what CoCoA can do for you, but what you can do for CoCoA!

D. Hints for Selected Exercises

Rough grinding is a caveman’s job: eat well, sleep well, and work like hell!

(John L. Dobson)

D.1 Hints for Exercises in Chapter 1

Exercise 1.1.1. Show that x^{2} − d generates a maximal ideal in ℚ[x]. Then prove that K ≅ ℚ[x]/(x^{2} − d).

Exercise 1.1.4. Let {v_{1}, ..., v_{n}} be a ℤ-basis of ℤ^{n}. Show that the ℤ-module homomorphism φ : ℤ^{n} ⟶ ℤ^{n} is an isomorphism, where φ is defined by φ(e_{i}) = v_{i} for i = 1, …, n. Therefore there exists a matrix B ∈ Mat_{n}(ℤ) such that AB = I.

Conversely, let x = (x_{1}, …, x_{n})^{tr} . Then det(A) ∈ {1, −1} implies that A is invertible in Mat_{n}(ℤ), and that the system of linear equations A · x = v has the unique solution A^{−1} · v.

Exercise 1.1.6. Let B = {r_{λ} | λ ∈ Λ} be an R-basis of the non-zero ideal I. If it contains two elements r_{λ_{1}} , r_{λ_{2}} , then r_{λ_{2}}r_{λ_{1}} − r_{λ_{1}}r_{λ_{2}} = 0 r_{λ_{1}} − 0 r_{λ_{2}} . If it contains one element r which is a zero-divisor, then there exists a non-zero element s ∈ R such that sr = 0r = 0.

Conversely, if I = (r) and r is a non-zero divisor, then the multiplication by r yields an isomorphism of R-modules between R and I.

Exercise 1.1.7. We give a hint on c) ⇔ a). Every non-zero element r generates a principal ideal. Since this is a cyclic R-module, the element r is a non-zero divisor. Conversely, assume that there exists a non-zero non-invertible element r. Then the cyclic R-module R/(r) is not free.

Exercise 1.2.3. To prove a), use the fact that the canonical images of monic polynomials have the same degree.

Exercise 1.2.5. By assumption, there exists an element a ∈ 𝔭 \ {0}. Obviously, the element a is not a unit. Then at least one of its irreducible factors, say p, is in 𝔭. The factoriality of R implies that (p) is prime. Hence we have (p) = 𝔭.

Exercise 1.2.7. We extend the hint on the proof of c) given at the end of the exercise. We see that f_{1} = 2 + 2\sqrt{−5} = 2(1 + \sqrt{−5}) and that f_{2} = 6 = 2 · 3 = (1 − \sqrt{−5})(1 + \sqrt{−5}). Let g = gcd(f_{1}, f_{2}). Then there exist a_{1}, a_{2}, b_{1}, b_{2} ∈ ℤ such that g = 2(a_{1} +b_{1}\sqrt{−5}) = (1+\sqrt{−5})(a_{2} +b_{2}\sqrt{−5}). Define φ(a+b\sqrt{−5}) = a^{2} +5b^{2} . Show that φ is compatible with the product and evaluate φ(g). In this way, you get 2(a_{1}^{2} + 5b_{1}^{2}) = 3(a_{2}^{2} + 5b_{2}^{2}) in ℕ. Hence 6 | φ(g). On the other hand, we have φ(g) | φ(2 − 2\sqrt{−5}) and φ(g) | φ(6), so that φ(g) | 12. Now we combine g = (1 + \sqrt{−5})(a_{2} + b_{2}\sqrt{−5}) and 6 | φ(g) | 12 and get g = 1 + \sqrt{−5}. Together with g = 2(a_{1} + b_{1}\sqrt{−5}), this yields a contradiction.

Exercise 1.2.9. To prove a), use Exercise 1.2.8. We give a hint on how to prove that x_{1} + (f) is irreducible in P/(f). Suppose that there exist g, h ∈ P such that x_{1}+(f) = (g+(f))(h+(f)). Then there exists a polynomial r such that x_{1} = gh+rf holds in P . Now use considerations about the degrees of the polynomials involved in this equation.

Exercise 1.2.11. We give a hint on c). To prove 1) ⇒ 2), you may assume that f = x(x − a)(x − b) and then use a). For the converse implication, you may use f = x(x−1)(x+1) to show that 3 is a square, and then use b) to get the conclusion.

Exercise 1.3.3. To prove d), look at the cardinality of the sets under consideration.

Exercise 1.3.5. Imitate the proof of Proposition 1.3.11.b.

Exercise 1.3.6. Let {δ_{1}, ..., δ_{s}} be a finite system of generators of Δ, and let B = {b_{i} | i ∈ I} be a system of generators of Δ. Then, for every k ∈ {1, ..., s}, there exist γ_{k} ∈ Γ and b_{i_{k}} ∈ B such that δ_{k} = γ_{k} ∘ b_{i_{k}}. Therefore {b_{i_{1}}, ..., b_{i_{n}}} generates Δ.

Exercise 1.3.8. Use Dickson’s Lemma 1.3.6.

Exercise 1.3.9. Use the fact that 𝕋^{n}⟨e_{1}, …, e_{r}⟩ = ∪_{i=1}^{n}𝕋^{n}e_{i}.

Exercise 1.4.5. Use the observation made after Proposition 1.4.14 that

t_{1} ≥_{Ord(V )} t_{2} ⟺ V · (log(t_{1}) − log(t_{2})) ≥_{Lex} 0

Exercise 1.4.6. We have DegLex = Ord(V), where

V = ( \begin{matrix}1 & 1 & … & 1 & 1 \\ 1 & 0 & … & 0 & 0 \\ 0 & 1 & ... & ⋮ & ⋮ \\ ⋮ & ... & ... & 0 & ⋮ \\ 0 & … & 0 & 1 & 0 \end{matrix} )

Exercise 1.5.3. Observe that LT_{σ}(x_{2}f_{2} − x_{1}f_{3}) = x_{1}x_{3} ∉ (x_{1}^{4}x_{2}, x_{1}^{3}x_{2}^{3}, x_{1}^{2}x_{2}^{4}).

Exercise 1.5.4. Let σ = Lex, let a, b ∈ K[x_{1}, x_{2}, x_{3}], let f_{1} = a(x_{1} − x_{3}^{3}), let f_{2} = b(x_{2} − x_{3}^{4}), and let f = f_{1} + f_{2} . First, examine the cases where a or b are zero. Then assume that both are non-zero polynomials, and examine the case where LM_{σ}(ax_{1})+LM_{σ}(bx_{2}) ≠ 0. Finally, assume that LM_{σ}(ax_{1})+LM_{σ}(bx_{2}) = 0. Show that in every case LT_{σ}(f) is a multiple of x_{1} or x_{2} .

Exercise 1.6.3. The process of replacing a power product in x_{1} with smaller power products in x_{1} , and the process of replacing a power product in x_{2} with smaller power products in x_{2} are independent.

Exercise 1.7.8. To prove a), use the fact that, for r, r′ ∈ R_{γ} \ {0}, we have r′ = (r^{−1}r′)r. To prove d), use Corollary 1.7.11.

D.2 Hints for Exercises in Chapter 2

Exercise 2.1.2. To prove a) ⇒ b), argue by contradiction. Assume that x_{i_{1}} = x_{i_{2}} and consider the polynomial \frac{1}{LC_{σ}(g_{1})} g_{1} − \frac{1}{LC_{σ}(g_{2})} g_{2} . To prove b) ⇒ a), we suggest an anticipation of a method which will be used later in Section 2.3. For a pair (a_{1}, a_{2}) ∈ P^{2} \ {(0, 0)}, we define deg(a_{1}, 0) = LT_{σ}(a_{1}), deg(0, a_{2}) = LT_{σ}(a_{2}), and deg(a_{1}, a_{2}) = max{LT_{σ}(a_{1}), LT_{σ}(a_{2})} if both a_{1} and a_{2} are non-zero. Given g = a_{1}g_{1}+a_{2}g_{2} , we say that g has a representation via (a_{1}, a_{2}), and that deg(a_{1}, a_{2}) is the degree of the representation. Show that every element in the ideal (g_{1}, g_{2}) has a representation of minimal degree. Then prove that such a representation satisfies Condition A_{2}).

Exercise 2.1.3. Use K[x, y], g_{1} = x + 1, and g_{2} = y + 1.

Exercise 2.1.4. Use g_{3} = (x_{1} + 1)g_{1} − x_{2}g_{2} = x_{2}^{2} − x_{2} .

Exercise 2.1.5. Use the suggestion given for Exercise 2.1.2 above, and the fact that x^{3} and y^{3} are coprime.

Exercise 2.2.4. To prove a) ⇒ b), show that there exists a term ordering τ such that t_{1} >_{τ} t_{2} .

Exercise 2.3.7. To show a), use Theorem 2.3.7.b.

Exercise 2.4.8. Use Proposition 1.3.11.

Exercise 2.5.5. Show that every reduction step transforms a binomial into a binomial.

Exercise 2.6.1. Suppose there exists i ∈ {1, …, n} such that 𝔪 ∩ K[x_{i}] = (0). Then show that there exists a K -algebra homomorphism K[x_{i}] ⟶ P/𝔪 which is injective.

D.3 Hints for Exercises in Chapter 3

Exercise 3.1.1. Use the fact that P is a factorial domain.

Exercise 3.1.3. We have Σ = {σ_{12}, σ_{13}, σ_{23}}, where σ_{12} = xε_{1} − yε_{2} , where σ_{13} = xε_{1} − zε_{3} , and where σ_{23} = yε_{2} − zε_{3} = σ_{13} − σ_{12} . Then consider the set 𝔹′ = {(1, 2), (1, 3)}.

Exercise 3.2.9. To prove b) ⇒ a), use the fact that ab(c, d) = bc(a, b).

Exercise 3.3.4. To show a), use the fact that fx + gy = (f − y)x + (g + x)y.

Exercise 3.4.6. Show that {g_{1}, …, g_{n}} is a Gröbner basis with respect to a suitable module term ordering.

Exercise 3.4.7. Prove that B ≅ P̂/(I ∩ P̂).

Exercise 3.4.11. Use Proposition 3.4.6.

Exercise 3.5.2. Consider the ideal 𝔭R_{S}.

Exercise 3.5.4. Prove that there is an isomorphism between P_{S} and P_{f}.

Exercise 3.5.7. To find an example with the required property, you may consider the polynomial ring K[x] and the following exact sequence of P -modules.

0 ⟶ P ⟶^{x} P ⟶ P/(x)P ⟶ 0

Exercise 3.5.9. If you do not find a proof, use CoCoA to show that d_{1}^{2}, d_{2}^{2} ∈ J in the case K = ℚ. Then verify that the representations of d_{1}^{2} and d_{2}^{2} obtained with CoCoA are valid for every field K.

Exercise 3.6.4. Consider the K -algebra homomorphism φ : K[x_{1}, …, x_{s}] ⟶ R which is defined by φ(x_{i}) = f_{i} + I for i = 1, …, n.

Exercise 3.6.9. Prove that the Jacobian determinant of the composition of two K -algebra homomorphisms from P to P is the product of the two Jacobian determinants.

Exercise 3.7.1. One important step in the proof is to show that if K is not a perfect field, then there exists a squarefree polynomial f such that gcd(f, f′) = 1. Let a ∈ K be such that it has no p^{th} root in K. Then show that f = x^{p} − a is irreducible. To do this, you may consider f as an element of \overline{K}[x].

Ich habe fertig. (Giovanni Trapattoni)

Notation

1. Special Sets

ℕ set of natural numbers, ℕ = {0, 1, 2, …} ℤ set of integers ℚ set of rational numbers ℚ_{>0} set of positive rational numbers \overline{ℚ} set of algebraic numbers ℝ set of real numbers ℂ set of complex numbers 𝔽_{q} finite field with q elements ℤ[i] ring of Gaußian numbers 𝕀 set of irrational numbers, 𝕀 = ℝ \ ℚ 𝔖_{n} symmetric group on n elements 𝔸_{K}^{n} n-dimensional affine space over a field K 𝔹 set of pairs 𝔹 = {(i, j) | 1 ≤ i < j ≤ s, γ_{i} = γ_{j}} 𝕋^{n} or 𝕋(x_{1}, …, x_{n}) set of terms in the indeterminates x_{1}, …, x_{n} 𝕋^{n}⟨e_{1}, …, e_{r}⟩ set of terms in K[x_{1}, …, x_{n}]^{r}, i.e. the set of all te_{i} such

that t ∈ 𝕋^{n} and 1 ≤ i ≤ r

𝕊(C) set of all C -splines ℙ(V) projective space associated to a vector space V ℙ_{K}^{n} projective space associated to K^{n} 𝔼^{n} set of extended terms x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}, where α_{1}, …, α_{n} ∈ ℤ

2. Sets and Maps

A ⊆ B set A is a (not necessarily proper) subset of set B A ⊂ B set A is a proper subset of set B A \ B set difference of A and B, i.e. the set of all elements of A

which are not contained in B

#A number of elements of a finite set A ψ ∘ φ composition of two maps φ : A ⟶ B and ψ : B ⟶ C Im(φ) image of a map φ : A ⟶ B Ker(φ) kernel of a homomorphism φ : A ⟶ B Coker(φ) cokernel of a homomorphism φ : A ⟶ B, i.e. Coker(φ) =

B/ Im(φ)

id_{A} identity map on a set A A −↠ B a surjective map A ⟶ B A ⟶ B an injective map A ⟶ B φˇ dual of a linear map 0 ⟶ A ⟶^{φ} B ⟶^{ψ} C ⟶ 0 exact sequence of homomorphisms, i.e. a se-

quence such that φ is injective, ψ is surjective, and Im(φ) = Ker(ψ)

LM : P^{r} ⟶ P^{r} map defined by LM(m) = LM_{σ}(m) for m ≠ 0 and

LM(0) = 0

LF : P^{s} ⟶ P^{s} map defined by LF(m) = LF_{σ,G}(m) for m ≠ 0 and

LF(0) = 0

Z_{L}(f) set of zeros of a polynomial Z_{L}(I) set of zeros of an ideal \overline{p_{1}p_{2}} line through two points p_{1} and p_{2} (p_{0} : …: p_{n}) point in an n-dimensional projective space Hyp(ℙ_{K}^{n}) set of hyperplanes in ℙ_{K}^{n} Lin(ℙ_{K}^{n}) set of lines in ℙ_{K}^{n} (ℙ_{K}^{n})ˇ dual projective space Grass_{m}(ℙ_{K}^{n}) Graßmannian of m-dimensional subspaces of ℙ_{K}^{n}

3. Orderings

≥_{σ} monoid ordering or module ordering Lex lexicographic term ordering DegLex degree-lexicographic term ordering DegRevLex degree-reverse-lexicographic term ordering RevLex reverse-lexicographic ordering Elim(L) elimination ordering for L Ord(V) ordering associated to the matrix V

4. Polynomials and Vectors

deg(f) degree of a polynomial Supp(v) support of a vector of polynomials gcd(f_{1}, …, f_{m}) greatest common divisor of f_{1}, …, f_{m} lcm(f_{1}, …, f_{m}) least common multiple of f_{1}, …, f_{m} sqfree(f) squarefree part of f cont(f) content of a univariate polynomial f f′ derivative of a univariate polynomial f Newton(f) Newton polytope of a polynomial [v_{1}v_{2}] line segment from v_{1} to v_{2} LT_{σ}(v) leading term of a vector of polynomials LC_{σ}(v) leading coefficient of a vector of polynomials LM_{σ}(v) equals LC_{σ}(v) · LT_{σ}(v) NR_{σ,G}(v) normal remainder of a vector LM_{σ}(G) defined by LM_{σ}(G) = (LM_{σ}(g_{1}), …, LM_{σ}(g_{s})) for a tuple

G = (g_{1}, …, g_{s})

deg_{σ,G}(v) σ -degree of a vector LF_{σ,G}(v) σ -leading form of a vector t_{ij} defined by t_{ij} = \frac{lcm(t_{i},t_{j})}{t_{i}} for terms t_{i}, t_{j} σ_{ij} fundamental syzygy, σ_{ij} = LC_{σ}(g_{i})^{−1}t_{ij}ε_{i} − LC_{σ}(g_{j})^{−1}t_{ji}ε_{j} S_{ij} S-vector of g_{i} and g_{j}, defined by S_{ij} = LC_{σ}(g_{i})^{−1}t_{ij}g_{i} −

LC_{σ}(g_{j})^{−1}t_{ji}g_{j}

NF_{σ,M}(v) normal form of a vector w.r.t. a submodule det(\frac{f_{i}}{x_{j}}) Jacobian determinant of a system of polynomials

5. Rings and Fields

char(K) characteristic of the field K Q(R) field of fractions of an integral domain R K[x_{1}, …, x_{n}] polynomial ring in the indeterminates x_{1}, …, x_{n} over K K(x_{1}, …, x_{n}) field of rational functions in the indeterminates x_{1}, …, x_{n}

over K

K[[x]] power series ring in one indeterminate K[x_{1}, …, x_{n}, x_{1}^{−1}, …, x_{n}^{−1}] Laurent polynomial ring K[x_{1}, …, x_{n}]^{G} ring of invariants of G ∏_{i=1}^{n} R_{i} direct product of the rings R_{1}, …, R_{n}

6. Ideals and Modules

rk(M) rank of a free module {e_{1}, …, e_{r}} canonical basis of a finitely generated free module M_{1} ⊕ M_{2} direct sum of two groups or modules I · M submodule of M generated by products fm, where f ∈ I

and m ∈ M

v + M residue class of a vector v modulo M ⟨m_{λ} | λ ∈ Λ⟩ module generated by the set {m_{λ} | λ ∈ Λ} (f_{λ} | λ ∈ Λ) ideal (or monoideal) generated by the set {f_{λ} | λ ∈ Λ} LT_{σ}(M) leading term module of M LT_{σ}{M} monomodule of terms in M Syz_{R}(G) syzygy module of a tuple G \sqrt{I} radical of an ideal I(S) vanishing ideal of a set of points Ann_{R}(M) annihilator of a module N :_{R} M colon ideal of N by M N :_{M} I colon module of N by I in M Hom_{R}(M, N) Hom-module of linear maps φ : M ⟶ N Ext_{R}^{i}(R/I, M) i^{th} Ext-module of R/I with values in M M_{S} localization of a module M at a multiplicatively closed set S M_{f} localization of a module at an element f N :_{M} I^{∞} saturation of a module N by an ideal I in M I_{L} lattice ideal associated to L

7. Matrices

Mat_{n}(R) set of n × n-matrices over R Mat_{m,n}(R) set of m × n-matrices over R GL_{n}(R) set of invertible n × n-matrices over R A^{tr} transposed matrix of A I_{s} identity matrix of size s × s A_{φ} matrix associated to a linear map φ Λ_{r,s} homomorphism mapping a linear map to its associated matrix Fl_{s,r} flattening isomorphism Φ_{r,s} isomorphism defined by Φ_{r,s} = Fl_{s,r} ∘ Λ_{r,s} A ⊗ B tensor product of A and B

8. Mathematical Operators

dim_{K}(V) dimension of a K -vector space V log(t) logarithm of a term, log(x_{1}^{α_{1}} ⋯ x_{n}^{α_{n}}) = (α_{1}, …, α_{n}) conv(S) convex hull of a set Vert(P) set of vertices of a polytope max_{σ}(A) maximum of the set A w.r.t. the relation σ inf(A) infimum of a set A of real numbers sup(A) supremum of a set A of real numbers ⟶^{g} reduction step using an element g ⟶^{G} rewrite relation defined by a set of vectors ⟷^{G} equivalence relation defined by ⟶^{G} Top_{K,L} relative Zariski topology depth_{I}(M) I -depth of a module IP(A, b, C) integer programming problem ϱ_{G} Reynolds operator of G ℓ(f) number of terms in the support of a polynomial f E(X) expected value of a random variable X Var(X) variance of a random variable X σ(X) standard deviation of a random variable X Cov(X, Y) covariance of two random variables X, Y ϱ(X, Y) correlation coefficient of two random variables X, Y

Bibliography

[AL94] W. Adams and P. Loustaunau, An introduction to Gröbner bases, Graduate Studies in Math. 3, Amer. Math. Soc., Providence 1994

[BW93] T. Becker and V. Weispfenning, Gröbner bases, Springer, New York 1993 [Bu65] B. Buchberger, On finding a vector space basis of the residue class ring mod-

ulo a zero dimensional polynomial ideal (in German), PhD Thesis, Universität Innsbruck, Innsbruck 1965

[BW98] B. Buchberger and F. Winkler, Gröbner bases and applications, London Math. Soc. Lect. Note Ser. 251, Cambridge University Press, Cambridge 1998

[CLS92] D. Cox, J. Little, and D. O’Shea, Ideals, varieties, and algorithms, Springer, New York 1992

[Ei95] D. Eisenbud, Commutative algebra with a view toward algebraic geometry, Springer, New York 1995

[Fr97] R. Fröberg, An introduction to Gröbner bases, John Wiley & Sons, Chichester 1997

[Ku80] E. Kunz, Introduction to commutative algebra and algebraic geometry, Birkhäuser, Boston 1985

[La70] S. Lang, Algebra, Addison-Wesley, Reading 1970

[Mi93] B. Mishra, Algorithmic algebra, Springer, New York 1993

[Va98] W. Vasconcelos, Computational methods in commutative algebra and algebraic geometry, Algorithms and Computation in Math. 2, Springer, Berlin 1998

[Wi96] F. Winkler, Polynomial algorithms in computer algebra, Springer, Wien

Index

affine

– algebra, 134

– set, 144

– space, 144

– variety, 138, 144 algebra, 18

– affine, 134

– automorphism, 231

– finitely generated, 23

– fundamental theorem of, 137

– presentation, 23 algebraic closure of a field, 137 algebraic element, 227 algebraic relation, 23, 227 algebraically closed field, 137 algorithm

– Berlekamp, 38

– Buchberger, 123

– division, 71

– Euclidean, 26

– extended Buchberger, 125

– extended Euclidean, 27

– for solving systems effectively, 257 – normal remainder, 75 alternating group, 237 annihilator, 166

– computation, 167

– of a cyclic module, 167

– of a module, 166 antisymmetry, 50, 54 associated

– elements, 31

– matrix, 182

– prime, 175

– projective space, 204

– toric ideal, 222 automorphism

– of a polynomial ring, 232

– of an algebra, 231

basis

– canonical, 20 – of a module, 19 Berlekamp algorithm, 38 binomial, 127

– ideal, 127

Buchberger triple, 131

Buchberger’s algorithm, 123

– extended version, 125

– optimization, 124, 131

Buchberger’s criterion, 122, 128

CoCoA, 11

– introduction, 275

– programming, 283 cancellation law, 42

– left, 42

– right, 42

canonical basis, 20

Cauchy-Schwarz inequality, 269 characterization

– of Gröbner bases, 111, 122

– of homogeneous prime ideals, 80 – of Noetherian modules, 112

– of Noetherian monoids, 42

                                     – of DegRevLex, 65

– of Lex, 63

                                     – of RevLex, 64

Chinese remainder theorem, 39, 245 coefficient, 22

– leading, 60 cogenerator, 47 colon ideal, 48, 166

– computation, 167, 175, 204

colon module, 169

– computation, 170, 175

– using elimination, 199 comaximal ideals, 245 commutative monoid, 17 complete relation, 50 complex of linear maps, 194 component elimination

– module, 202

– ordering, 202 confluent rewrite relation, 95 content, 33 contravariant Hom-functor, 182 convex

– hull, 67

– set, 67 coprime elements, 31 correlation coefficient, 268 cost compatible term ordering, 210 cost function, 209 covariance, 268 covariant Hom-functor, 182 cyclic

– group, 236

– module, 19

decomposition

– into homogeneous components, 77 degree

– compatible term ordering, 52

– in 𝕋^{n}⟨e_{1}, …, e_{r}⟩-graded modules, 102

– of a polynomial, 22

– of a spline, 157

– of a term, 22

– shifting, 78 degree-lexicographic term ordering, 51 degree-reverse-lexicographic term

ordering, 51 dense polynomial, 262 depth of a module, 193 dihedral group, 237 Diophantine system, 207 disconnected set, 142 division algorithm, 71

– implementation, 74 domain

– Euclidean, 36

– factorial, 30

– integral, 18

– principal ideal, 19 dual

– map, 190

– projective space, 205

– sequence, 190

effective p^{th} roots, 248 efficient

– frontier, 269

– portfolio, 269 element

– algebraic, 227

– associated, 31 – coprime, 31

– defines a rewrite rule, 92

– homogeneous, 76

– irreducible, 29

– prime, 29

– reduces to another element, 92

– reducible, 29

– squarefree part, 31

– transcendental, 227 elementary symmetric polynomial, 66 elimination

– computation, 197, 202

– ideal, 196

– module, 48, 196, 202

– of module components, 202

– ordering, 52, 196, 202 Enneper surface, 233 Euclidean algorithm, 26

– extended, 27 Euclidean domain, 36 evaluation, 23

– homomorphism, 23 exact sequence

– defining syzygies, 100

– of Hom-modules, 185 expected return, 268 explicit membership, 152 Ext-module, 194 extended division, 214, 220 extended term, 208

factorial domain, 30 factorization, 29 fiber, 234 field, 17

– algebraic closure, 137

– algebraically closed, 137

– finite, 27

– graded, 82

– having effective p^{th} roots, 248

– of algebraic numbers, 98

– of definition, 116

– of fractions, 212

– perfect, 37, 247 finiteness criterion, 243 flattening isomorphism, 182 folium of Descartes, 201 form, 77 Frobenius map, 37 functoriality of the Hom-module, 182 fundamental diagram

– of Hom-modules, 187

– of syzygy modules, 103, 121 fundamental property – of term orderings, 56 fundamental theorem

– of algebra, 137

Gaußian

– elimination, 119

– numbers, 36, 80 general linear group, 236 generation of leading term modules, 88 Gröbner basis, 111

– characterization, 111

– computation, 129

– existence, 112

– homogeneous, 120

– invariance under field extension, 116 – minimal, 118

– reduced, 115, 120 Graßmannian, 206 graded

– field, 82

– free module, 78

– module, 77

– residue class module, 79

– residue class ring, 79

– ring, 76

– submodule, 79 grading

– by 𝕋^{n}, 77

– by 𝕋^{n}⟨e_{1}, …, e_{r}⟩, 78

– on syzygy module, 101

– standard, 77 graph, 235

– colouring, 143 greatest common divisor, 31

– computation, 165 group, 17

– alternating, 237

– cyclic, 236

– dihedral, 237

– general linear, 236

– of matrices, 236

– of permutations, 237

– of reflections, 237

– of rotations, 237

Heron’s formula, 196 Hilbert’s basis theorem, 113 Hilbert’s Nullstellensatz, 140

– field-theoretic version, 136

– strong version, 140

– weak version, 139 Hilbert’s syzygy theorem, 159 Hom-functor – contravariant, 182

– covariant, 182

– exactness properties, 185 Hom-module, 181

– computation, 186 homogeneous

– component, 77

– element, 76

– form, 77

– Gröbner basis, 120

– ideal, 79

– linear map, 78

– polynomial, 77, 83

– prime ideal, 80

– system of generators, 79 homogenization, 172 homomorphism

– algebra, 18

– characteristic, 18

– evaluation, 23

– Frobenius, 37

– module, 18

– of graded modules, 78

– of graded rings, 78

– ring, 18

– structural, 18

– substitution, 23, 226 hyperplane, 204

ideal, 18

– binomial, 127

– colon, 48

– comaximal, 245

– elimination, 196

– homogeneous, 79

– irreducible, 264

– lattice, 223

– maximal, 19

– membership test, 114

– monomial, 44

– of algebraic relations, 23, 227

– primary, 264

– prime, 19

– principal, 19

– radical, 48, 139

– stable, 119

– toric, 222

– vanishing, 140

– zero-dimensional, 244 ideal quotient, 166 image

– of a linear map, 178

– of a morphism, 235

– of an algebra homomorphism, 228 implicitization, 227 increasingly ordered tuple, 118 integer programming, 207, 222 integral domain, 18 interreduced tuple, 118 intersection

– computation, 174, 203

– of several submodules, 164

– of two submodules, 162

– using elimination, 199 invariant polynomial, 237 invariant theory, 236 irrational numbers, 42 irreducible

– element, 29

– ideal, 264

– w.r.t. a rewrite relation, 92 irredundant system of generators, 154

Jacobian

– conjecture, 233

– determinant, 233

kernel

– computation, 191, 227

– of a linear map, 178

– of an algebra homomorphism, 227 Klein four group, 236 Kronecker product, 184 Krull-Azumaya lemma, 76

Lagrange interpolation, 156 Lagrange multipliers, 270 lattice, 223

– ideal, 223 Laurent polynomial, 208 leading

– coefficient, 60

– form, 102

– position, 60

– power product, 60

– term, 60

– term ideal, 62

– – of a square, 123

– term module, 61 least common multiple, 31

– computation, 165 left-cancellation law, 42 lemma

– of Dickson, 43

– of Gauß, 33

– of Krull-Azumaya, 76

– of Nakayama, 81

– of Seidenberg, 250 lexicographic term ordering, 51 lifting

– computation, 109, 180

– existence, 106, 180

– of a linear map, 180

– of syzygies, 106, 109

line, 144

– in projective space, 204

– segment, 67

linear algebra, 119, 178

linear map, 18

– homogeneous, 78 localization, 213 logarithm, 22

Macaulay’s basis theorem, 62, 115 matrix

– associated to a linear map, 182 – group, 236

– notation, 147 maximal ideal, 19

– structure theorem, 137, 141 MEL-rule, 272 method of tag variables, 196 minimal Gröbner basis, 118 minimal polynomial, 227

– of an algebraic number, 89, 98 minimal risk portfolio, 270 modern portfolio theory, 267 modular law, 173 module, 18

– annihilator, 166

– basis, 19

– colon, 169

– cyclic, 19

– defined over a field, 116

– depth, 193

– elimination, 48, 196

– finitely generated, 19

– free, 19

– graded, 77

– graded free, 78

– monomial, 44

– Noetherian, 112

– of fractions, 213

– of homomorphisms, 181

– of syzygies, 100

– ordering, 54

– projective, 191

– rank, 19

– term ordering, 54 Molien’s theorem, 238 monic – polynomial, 60

– tuple, 118 monoid, 17, 41

– commutative, 17

– ideal, 41

– module, 41

– Noetherian, 42

– ordering, 50

– with cancellation law, 42 monoideal, 41 monomial ideal, 44 monomial module, 44

– structure theorem, 44 monomodule, 41

– Noetherian, 46 morphism of affine spaces, 234 multiplicatively closed set, 212

Nakayama’s lemma, 81 natural spline, 158 Newton polytope, 67 Newton’s identities, 239 nilpotent element, 18 Noetherian

– module, 112

– monoid, 42

– monomodule, 46 non-zerodivisor, 18

– for a module, 171, 176 normal

– x_{i} -position, 254

– form, 73, 113

– remainder, 73, 75

– remainder algorithm, 75

– selection strategy, 124 Nullstellensatz

– field-theoretic version, 136

– strong version, 140

– weak version, 139 number field

– algebraic closure, 98

– Gaußian, 36

– quadratic, 24

ordering

– RevLex, 52

– compatible, 55

– induced by a tuple, 149

– of a monoid, 50

– of a monomodule, 54

– of terms, 50

– represented by a matrix, 52, 57 – reverse-lexicographic, 52 outer product, 184

palindromic verse, 241 parametrically defined space curve, 196 perfect field, 37, 247 permutation group, 237 Plücker relations, 207 point, 137

– in projective space, 204 polynomial, 20

– binomial, 127

– content, 33

– dense, 262

– derivative, 35

– elementary symmetric, 66

– homogeneous, 77, 83

– invariant, 237

– Lagrange interpolation, 156

– Laurent, 208

– map, 234

– minimal, 89, 227

– monic, 28, 60

– multivariate, 20

– primitive, 33

– representation, 24, 60, 66

– squarefree part, 37

– strange, 261

– symmetric, 66, 129, 230

– univariate, 20

– zero, 137 polynomial ring, 20

– factoriality, 33

– surjective homomorphism, 230

– univariate, 20 polytope, 67

– Newton, 67

– vertex, 67 portfolio, 268 power product, 22 preimage computation, 162 presentation

– of a module, 164

– of a subquotient, 164

– of an algebra, 23

– of the image, 178, 228

– of the kernel, 178

– via generators and relations, 164 primary

– decomposition, 264

– ideal, 264 prime

– associated, 175

– element, 29

– ideal, 19 primitive element theorem, 256 primitive polynomial, 33 principal ideal domain, 19 projection, 235 projective

– hyperplane, 204

– line, 204

– module, 191

– point, 204

– space, 204 pullback, 191

– universal property, 192 Pythagorean triple, 173

– fundamental, 173

– positive, 173

radical, 139

– ideal, 48, 139

– membership test, 219

– of a zero-dimensional ideal, 247 – – computation, 251 rank, 19 reduced Gröbner basis, 115, 120 reduces in one step, 92 reducible

– element, 29

– ideal, 142

– topological space, 142 reduction step, 92 reflection group, 237 reflexivity, 50, 54 regular sequence, 171

– in an ideal, 193

– test, 172 relation, 50

– algebraic, 23

– complete, 50

– rewrite, 92 relatively prime elements, 31 reverse-lexicographic ordering, 52 rewrite relation, 92

– confluent, 95 rewrite rule, 92 Reynolds operator, 238 right-cancellation law, 42 ring, 17

– graded, 76

– homomorphism, 18

– of invariants, 238

– polynomial, 20

– unique factorization, 30 rotation group, 237 running example, 100 S-polynomial, 122 S-vector, 122 saturation, 215

– and localization, 216

– computation, 215, 217, 220

– exactness properties, 220 scalar multiplication, 18 Seidenberg’s lemma, 250 set

– affine, 144

– convex, 67

– disconnected, 142

– multiplicatively closed, 212

– of zeros, 138 shape lemma, 257 shifting degrees, 78 special generation of submodules, 87 spline, 155

– degree, 157

– function, 156

– natural, 158 squarefree part, 31

– computation, 249 stable ideal, 119 standard deviation, 268 standard grading, 77 strong law of large numbers, 271 subalgebra

– membership test, 230

– of a function field, 240

submodule, 18

– membership test, 114 submonomodule, 41 substitution homomorphism, 23, 226 support, 22 symmetric

– group, 66

– polynomial, 66, 129, 230

system

– of Diophantine equations, 207 – of Diophantine inequalities, 207 – of polynomial equations, 241 system of generators

– homogeneous, 79

– irredundant, 154

– minimal homogeneous, 81

– minimal monomial, 45

– of a module, 19

– of a monoideal, 41

– of a monomodule, 42

– of an algebra, 23

– of leading term module, 88

– special, 87 syzygy, 100

– of terms, 104

– trivial, 125 syzygy module, 100

– computation, 152, 203

– of a Gröbner basis, 151

– of elements of a monomial module, 104, 108

syzygy theorem of Hilbert, 159

Taylor expansion, 272 tensor product, 184 term, 22

– extended, 208

– leading, 60

– of a module, 22 term ordering, 50

– DegLex, 51
– DegRevLex, 51
– Elim(L), 52

– Lex, 51

– Ord(V), 52
– PosTo, 55
– ToPos, 55

– classification, 58

– compatible, 55

– cost compatible, 210

– degree compatible, 52

– degree-lexicographic, 51

– degree-reverse-lexicographic, 51 – elimination, 52, 196

– induced by a tuple, 149

– lexicographic, 51

– module, 54

– represented by a matrix, 52 theorem

– Chinese remainder, 39, 245 – of Hilbert, 113, 159

– of Macaulay, 62, 115

– of Molien, 238

– primitive element, 256

toric ideal, 222 total return, 267 transcendental element, 227 transitive closure, 92 transitivity, 50, 54 trivial reduction, 92 trivial syzygy, 125 twisted cubic curve, 201

– tangent surface, 233

unique factorization domain, 30 universal property

– of localization, 219

– of polynomial rings, 23

– of the pullback, 192

vanishing ideal, 140

variance, 268

Veronese surface, 235

vertex, 67

well-ordering, 55

Whitney’s umbrella, 235

Zariski closure, 144 Zariski topology, 144 zero, 137

– set, 138, 144

zero-dimensional ideal, 244